Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the specific <Ad ID, Campaign ID> that was clicked on from the landing page?

I've been searching for a solution to this, which I thought would be trivial, and seems pretty much impossible.

Here's the situation: I set up an AdWords campaign, ad groups and ads. I point them to www.mysite.com

Once visitors arrive to my site through one of my ads, I want to know which exact ad they clicked on (and campaign, as apparently the ad id isn't globally unqiue). Is this possible?

I first tried by enabling Destination URL auto-tagging, but seems like the gclid parameter is pretty much useless.

Then I looked at the UTMZ cookie, but it seems like at most (correct me if this isn't the case), you get the campaign number (is this even the ID in AdWords?) and the keywords searched or the ad's keywords, one of those. Not anything I can uniquely identify the ad by, right?

Finally, I looked at ValueTrack, although again correct me if I'm wrong, but this would mean manually changing the destination URL of each of my ads in AdWords, right? Even doing this, I'm not sure I can get something that lets me uniquely identify the clicked ad. Is {creative} what I want? It's described in the docs as the "unique ID of the creative", does that mean this includes the Campaign.Id and the AdGroupAd.Id?

Thanks!

like image 661
manuelflara Avatar asked Jun 20 '14 02:06

manuelflara


People also ask

How do I find my ad campaign ID?

Sign in to your Google Ads account. Click Ads & assets in the left page menu, then click Ads. In the statistics table, you'll find the ad ID in the “Ad ID” column.

How do I find a post ID?

This Post ID is a string of numbers at the end of a Facebook post's URL. The easiest way to find your Facebook post's direct URL is to go to the post itself in your Facebook Business Page newsfeed, and right-click on the date/timestamp on the post and open it in a new tab to go to the direct link of the post.

What is click ID value?

Google Click Identifier (GCLID): Definition Google Click ID (GCLID) is a parameter passed in the URL with ad clicks, to identify the campaign and other attributes of the click associated with the ad for ad tracking and campaign attribution. In Google Ads, this is enabled by turning on the auto-tagging setting.

How do I find my ad campaign on Facebook?

Go to the Page by tapping its name in your Feed or searching for it. Tap See All below Page Transparency. If you don't see this, tap About then tap See all next to Page transparency. Below Ads From This Page, tap Go to Ad Library.


1 Answers

There is a way to do what you want using tracking templates.

Navigating to auto-tracking and tracking template settings:

  1. Log in to Adwords, and click "Campaigns".
  2. Click "Shared Library" in the bottom left corner.
  3. Under "Shared Library", click "URL options".
  4. You'll now get these options: URL Options screenshot, with options "Tracking template" and "Auto-tagging"

These options are set for the entire account. I think it is possible to override the tracking template for individual campaigns, ad groups and ads. Here is what they mean:

Auto-tagging

Auto-tagging means that when a user clicks on an ad, they will go a URL with the gclid parameter appended, for example http://yourwebsite.com/?gclid=example. This value is useful for some things, such as for offline conversions, so your website should save it.

Tracking template

Tracking template means that when a user clicks on an ad, they will be directed to this URL. Interestingly, it does not have to be your website, as long as the URL redirects to your website. For instance, you could set it up to look like this:

http://trackingcompany.com/?url={lpurl}&campaignid={campaignid}

{lpurl} and {campaignid} are placeholders which AdWords recognises and knows how to handle. So, for example, if a user clicks on an ad, they could go to:

http://trackingcompany.com/?url=http%3A%2F%2Fyourwebsite.com&campaignid=543987

trackingcompany.com must redirect the user now to http://yourwebsite.com, otherwise, it is in violation of AdWords policy and your ads could be rejected.

Now, here's the clever bit that I didn't realise because all of this is badly documented: you don't have to use a third-party tracking company to get access to things like campaign id. You can just reuse your own website! Just set your tracking URL to something like this:

{lpurl}?campaignid={campaignid}

You see that? {lpurl} will get replaced with the landing page, which is your website! So the user in our example would go to this URL upon clicking an ad:

http://yourwebsite.com?campaignid=543987

It's not clear to me whether example.com must now redirect to the landing page URL without those parameters, or not.

I can't find documentation on these placeholders anywhere, but these are the ones that I've found work:

  • {lpurl} landing page URL
  • {campaignid} campaign ID
  • {adgroupid} ad group ID
  • {creative} creative or ad ID
  • {keyword} keyword

Auto-tagging and tracking template together

If you enable both auto-tagging and a tracking template, then AdWords would behave as it normally does with a tracking template, appending a gclid query parameter.


Addendum: ignoring these new query parameters in Google Analytics:

If you use Google Analytics, you probably want to ignore these query parameters, merging hits with these parameters with hits that don't have them. You can do that by setting the "Exclude URL Query Parameters" option to aw_campaignid,aw_adgroupid,aw_creative,aw_keyword. You can't apply this retroactively, so do this before making any AdWords changes.

Screenshot of Exclude URL Query Parameters option

like image 70
Flimm Avatar answered Oct 20 '22 04:10

Flimm