How to attribute website conversions to their source on Google Ads
You’re running Google Ads, with multiple campaigns, ad-groups and adverts, and you are getting conversions too, like signups or downloads. But can you attribute each conversion back to it’s source advert on Google?
If you already have some experience with Google Ads, you know how important it is to track conversions. Google Ads offer multiple ways to track. Once recorded, conversions show up on your ads dashboard. However, there is a problem. If you are running multiple campaigns, ad-groups and adverts, all targeted to one type of conversion (which may be a signup or download on your website), there is no way you can attribute conversions on your website back to a specific advert on Google Ads.
Stay with me and read on… this will get clear...
“Why we need to attribute conversions back to adverts, when Google Ads is already showing which advert converted?”

Well, the truth is that a signup or download on your website is a conversion from Google Ads standpoint, but it may not be a conversion for you! See below workflow to understand:

In most cases, signups and downloads offer free trials. This does not mean a conversion (sale). After the trial is over, only a portion of your trial customers choose to buy your product or service. And that’s when the real conversion happens. Google Ads job is done as soon as the action has been taken on your website. But you still need to work towards closing the lead and converting it to sale.
Experts may argue that:
1. Instead of tracking conversions at signup event, we should be tracking conversions at payment event.
This is true in case of e-commerce sites where payment is traceable within a short conversion window. However, for SaaS or Software products, where actual sale may happen very late or may even be offline, it cannot be tracked by Google Ads.
2. Create two different conversion types in Google Ads. One for signups and another one for payments.
This poses another problem. Both the conversions will show up in your Ads Dashboard. Upon a payment based conversion, Google may count it twice (based on conversion window and attribution setting). Moreover, this method can also not track if conversion happens offline.
Where do we need to concentrate?
What I am talking about is back-tracking your conversions to adverts and not forward-tracking your adverts to conversions (which is already taken care by Google Ads).
If you pick any one of your paying customers and want to know “Which advert got me this customer?”, you probably won’t have an answer.
If you have already thought about it or asked this question to yourself but didn’t know how to get this done, here’s a guide for you. I assume you are already familiar with web development and understand how signups are being saved in your application database.
A few tweaks are needed in your Google Ads account as well as your application where you are saving signups. Let’s discuss the step-by-step process:
Step 1: Pass Campaign, AdGroup, AdName as URL suffix from Google Ads
Edit any of your advert inside Google Ads and find the section named “Ad URL options” and then “Final URL suffix”. Here, you simply need to specify the name of campaign, ad-group and advert as shown below:

Campaign=India&AdGroup=HRMgmt&AdName=RespText1
The values in bold are the ones that you will have to come up with, based on your ad setup. To keep things simple, use your Campaign name and Ad Group name in Google Ads, and assign a meaningful name to each Advert.
What this will do is, when someone clicks on your ad, Google Ads will append the above parameters at end of your final landing page URL. For e.g., if your landing URL is https://runtime.one, you will get a hit at: https://runtime.one?Campaign=India&AdGroup=….
You need to do this for each ad, passing different values for Campaign, AdGroup and AdName, as the case may be.
Note: The above edit will put your ad into review which may take a while to get approved. So you may not want to do this for all your ads at once.
Step 2: Capture the parameters on your landing page
This step requires website back-end coding (talk to your web developer, if you are not the one). On your landing page, you need to capture the parameters defined above. Here’s an example how you can do it in ASP.NET website under a View Controller:
Before:
public ActionResult Index()
{
//your code here...
}After:
public ActionResult Index(string Campaign = "", string AdGroup = "", string AdName = "")
{
//your code here...
}
Note: The reason we kept default values for all parameters (like Campaign=“”) is because the action method should be accessible even when none of the values are passed (normal page hit, other than Google Ads). This should be easy to do in PHP also. Search Google or YouTube for “How to get parameters from a URL string in PHP” to find your way.
Step 3: Create a session when a user lands on your website
As soon as a new user lands on your website, create a session with the above parameters associated with it (Campaign Name, AdGroup Name and AdName).
You can create a simple database table with SessionId, Campaign, AdGroup and AdName columns.
A session table in your database may look like this:
+----------------+--------------+-----------+------------+
| Session Id | Campaign | AdGroup | AdName |
+----------------+--------------+-----------+------------+
| ABCD123456 | India | HRMgmt | RespText1 |
+----------------+--------------+-----------+------------+
Sessions are basically an identifier for every unique visitor on your website (like ABCD123456 above). Session information is stored in a cookie and sent back to the users, which is then stored in their browser. Now, wherever the user navigate on your website, you can keep recording the page visits against the session. If you want to know more on this topic, let me know in comments, I will write another post explaining how to create and track a session cookie.
Step 4: Attribute each conversion to a session
Since you are now tracking your visitor using a session, you can easily associate the SessionId with each signup. Simply add a ‘SessionId’ column to your signups table. Whenever a new signup occurs, save the current SessionId along-with other details like user’s email, password etc. in the signup table. How you store your signup information is completely up to you and depends largely upon your application.
By adding the SessionId to each signup, you now know which Campaign, Ad-Group and Advert resulted in the signup. When the trial period is over, and an actual conversion occurs, you will know which exact Campaign, AdGroup and Advert resulted in it.
Conclusion
This data will become increasingly important over a period of time. You can run experiments for e.g. one campaign on a particular type of audience and another of a different type. After a while, you will know which audience type resulted in higher conversions. Using these insights, you can keep improving your Ad campaigns and/or keep optimizing your spend allocation amongst different campaigns for better ROI.