Better Adwords Remarketing through Google Analytics


Back in May our own Brittany Baeslack wrote up a great post on the Four Essential Rules to PPC Remarketing which laid out how exciting the new remarketing trends are and what you could do as an organization to leverage remarketing to improve your Adwords buys. Her post has been updated to reflect the exciting new changes AdWords has made to remarketing implementation. Remarketing essentially if you’re not familiar with it, is a way for you to place Google Adwords specifically to people who have visited your site before. It’s a way of saying “Hey this person visited my site, I want to show THEM ads to try and remind them to come back to my site.” Back in May this was done by placing a piece of code on a specific page on your site, and if a person visited that site you could identify them on a list in your Google Adwords, and then choose to focus ads on only those people. Pretty powerful stuff.

You should read her post, but the four main rules Brittany laid out were

  • Does this apply to you (should you even do it?)
  • Exclusions (figuring out who to remarket to)
  • Frequency Capping (limiting how often they see the ads)
  • Limiting Traffic (limiting where they see the ads)

Well Friday, July 27th 2012 Google dropped a new feature into the internet that radically changes, for the good, one of these areas. Remarketing with Google Analytics. Now your remarketing has gotten both easier AND far more powerful. How so? Two main ways.

Firstly, you only have to change one line of code on your site, once. Then you can do the rest of your list creations within Analytics and Adwords. No more having to add new code to each individual page when you want to create a new remarketing list. One and done.

Secondly, and far more important, you’ll be able to create incredibly detailed lists by leveraging Google Analytics data to create them.

Once this is rolled out to all users, you will be able to remarket to a list based on far more than just hitting a specific page. You can remarket to all visitors to your site, or to ones that visit only a specific area of your site. You can create a conversion goal in Google Analytics and remarket to people who completed that goal. That means you can remarket to people who reached any specific URL Destination on your site (like the original/current remarketing) but also to those who stayed on your site for a certain length of time or to those that viewed a certain number of pages. Or to users who triggered an event goal like maybe viewing a video or downloading a pdf or even hitting a 404 error page.

Lastly you can have the list match a specific criteria of a visitor segment. These include both metrics and dimensions, as well as sequence filters. So you can match a list to users from a specific region, using a specific operating system on their computer, who have visited the site a certain number of times, and spent a certain amount of money in ecommerce transactions.

Is it hitting you yet how powerful this is going to be?

Maybe you are a software company that focuses on creating accounting software for Macs, and it’s coming up on Tax time. You could reach out to customers by defining a remarketing list that focuses on people who  have visited your site twice (more than a passing interest) and did so while using a Mac rather than a PC, as well as having actually visited your personal tax software page as well as your small business tax software page, after having initially visited your website by clicking on an ad campaign you ran the previous month. You can now target those people.

Maybe you are going to have Google Analytics and Adwords training seminars in Boston and you want to retarget to people just in New England who visited your site from an organic non-branded Google search and spent at least 5 minutes on your site.

Maybe you run a soap company and you want to get your current customers to buy additional types of products (like shampoo in addition to body wash). You can see in Google Analytics that people who buy the Lavender Body Wash tend to also buy the Lavender Shampoo, so you can create a list that targets only visitors who have completed a prior conversion of the Lavender Body Wash within the past week.

 How bout now? Starting to get it?

Ok so what do you have to do to get this going. First you’ll have to wait. They’re rolling it out still so you probably don’t have it. Once you do there will be a remarketing tab in your account admin section where you can define lists and then those will be almost immediately visible in your Adwords remarketing areas.

Before you get that though you can prepare. You’ll need to do two things. First you need to do one code change to your Google Analytics. Find the line below in bold in your current GA setup, and change it to the following one. It’ll still track as normal, but just be able to handle the new remarketing.

Second thing you’ll need to do is update your privacy policy. I’ll let you read that one on the Google site because it goes into more detail regarding using the DoubleClick cookie for your tracking rather than Google Analytics. Depending on your company, where you’re located, and what you’re doing you’ll need to inform your users in different ways.

Also remember you need to have your Adwords and Analytics accounts linked. If you haven’t done that yet, find out how to do that here.


Right now if you were to make this switch your analytics could see a dip, because the doubleclick.js file is blocked by most default ad blocking software. This can be anywhere from 10 to 50% of your visitors depending on the type of site you are. The more you attract techies, the higher your ad block percentage. So if you were to implement this change you could see that 10-50% drop in your analytics numbers because those people will suddenly no longer be tracked in Google Analytics. We’re working on a solution to this problem, and when we have one, we’ll update this post.


Ok so, one question regarding the update above was: “Where are you getting those numbers?” and the answer is that the number comes from who have done some work in studying how many people are using adblockers.

The average across all segments was 9.26% of users had an adblocker installed that would most likely block the doubleclick.js file (given that it’s one of the most. Some sites in their testing, ones that were more tech based and atrracted a specific tech segment reached as high as 50%, but even the tech sites (such as LunaMetrics) averaged 17.79%. News sites averaged 15.58%, culture sites averaged 9.94%, and business, real estate and travel sites were lower. Countries in the EU blocked on average lower overal, but some such as Germany were at 19.44%, Austria at 22.50%, Hungary at 21.52%. Firefox users blocked on average 17.81%, Safari 11.30%, Chrome 10.06%, and Explorer at only 3.86%. Mobile blocking was much lower at 2.24% for Android, and 1.33% for iOS

Now how does that apply to your site? Who knows. Maybe you’re a business or real estate site  with mostly IE browsers and you have a really low percentage of adblocker users. Maybe those numbers from charityray are WAY OFF. I don’t know. They’re the most recent, most informative numbers I’ve seen. If someone has better numbers and a better survey I encourage you to post in the comments.

SO, I mentioned a suggestion… Try running a second tracker on your site for a bit. Get a second account and account number, and put two sets of tracking code on your pages. Then collect data for a few days or a week and see what sorts of differences you are seeing between the two accounts. Keep filters in mind, if you have filters on your main account, put them on the new second account as well where you use the doubleclick.js file in the tracker rather than the ga.js. Now if you’re seeing a tiny variation then you should feel good about using this feature right now. Otherwise you might want to consider using two sets of tracking code for the present, until a better solution is broached. That way you can do your targeted remarketing through the first account, but have accurate analytics data in the second.

Triple Super Secret Santa Solution

Ok here’s what we’re currently going to recommend… If you think you can take advantage of the remarketing, then go for it, but be aware that you might lose data and be prepared to dial it back. If you’re still concerned that your’e going to lose data try this trick we learned on the GACP secret forums…

1) Create a file advertising.js and include it on your site. Inside have simply _adblock = false;

2) Then change your GATC to the following….

That will load up the dc.js unless the adblock variable is not reset to false (which means the advertising.js file wasn’t loaded) and then loads ga.js. it’s not perfect but it lowered our own adblocked lost traffic on LunaMetrics from 10% to 2%, and we can live with 2% data loss to get the powerful features in the new remarketing.

Update – Triple Scoop Whipped Cream and a Cherry On Top Solution

Above the trackPageview line of code we’ve added another Custom Variable as well, to help us track who gets what.

if ( !_adblock ) {
          _gaq.push([‘_setCustomVar’,2,’Adblocker’,’Not Installed’,3]);
} else {

Nothing crazy. Just set whether the user has an Adblocker installed or not installed, which also indicates which code the user got, dc.js or ga.js. Looking at our analytics this morning from the past month it’s still looking like we’re getting about 10.5% of our users who block the dc.js code, which we deliver the ga.js code to instead.

adblocker custom variable


Retargeting is going to get even more powerful with these changes, so start preparing now. Think about different ways you can reach your audience. Reread Brittany’s article and think about how the changes to how you can define lists can help you to really specifically target your users with any metric, dimension or conversion, and keep an eye in your admin area for your new retargeting options!

Sayf is a former LunaMetrician and contributor to our blog.

  • YoraY

    great post Sayf, thanks alot for sharing this info

  • So thats what it means to be GACP – you published this article just before was published ;>

  • Something our developers brought up when we were discussing the tweak to the JS code: Doubleclick is probably one of the first URLs ad blockers look for out of the box. That JS reference contains all the tracking functionality, which means you’re now losing traffic from anyone that uses ad blocking, correct? Not sure how many people use ad blockers, so it may not matter.

  • Sayf Sharif

    Chris, you’re right that’s a great point.

    Some studies have shown it as high as 10%, or even 50% depending on the site. The more technical the website and the geekier your audience the more likely they are to use an ad blocker.

    Also it’s correct, and I tested it, that if your’e running a default ad blocker and using the code listed here you WILL NOT track the page in GA. So this is obviously an issue.

    Since I got your post all afternoon I’ve been working on trying to streamline a more elegant solution that will determine if you’re running an ad blocker, and then deliver the appropriate code if you are so that you’ll be able to track all users (who allow cookies and ga), but be able to also use the new doubleclick tracking for this retargeting without losing your data accuracy by 10-50%.

    When i get that working I’ll link it here, and probably create a brand new post about it on the blog.

  • Great Post Sayf!

  • has this issue re: tracking been resolved now? I wonder what impact will be seen for the new SERPs remarketing, but assume that uses the new doubleclick tags also.

  • Sayf Sharif

    It has not been resolved to my satisfaction. Google Analytics maintains that the number blocked is small, and in their tests they’ve never seen anything over 1%, but they’d be concerned if they saw numbers over 5%. A number of other marketers are publically stating that they’re seeing those numbers, but there is no direct resolution.

    I’ve done testing on a few sites, and on the LunaMetrics site we’re seeing around 10% of visitors blocking the doubleclick tracking method.

    There are a variety of proposed ways around it, but none are perfect. What we’re thinking of going with is the following..

    Here’s the code…

    end code

    This came from the GACP forums and isn’t our original idea, but it’s also appeared a few places, so i’m not sure who to really attribute it to, other than to say it’s not my original implementation.

    Basically you check for blocking, and in the advertising.js file all you do is change the adblock variable to false. Inside literally is only adblock=false; that way if that doesn’t load, adblock is true, and you load up the different dc.js or ga.js.

    In our tests this isn’t PERFECT, but it reduces our lost traffic from 10% to 2%, which we’re ok with. AT a certain point though you need to ask whether the lost data is more important, or the remarketing features are. I think with 2% data loss, it’s acceptable to get the power from the new remarketing features.

  • Sayf Sharif

    Ugh that formated horribly…

  • Sayf Sharif

    added the code above to the main post as well.

  • Sherif, thanks for the useful info. Can you Pls. share the top 10 visitor segmentation that are useful for remarketing based on your experience – Thanks, Ramki

  • Sayf Sharif

    That sounds like it’d be a good post all on it’s own, though I’m not sure that one visitor segment would work as good for everyone.

  • Rubens Santos

    Regarding the adblocker issue, you said that we can use double GA tracking, in order to measure the difference in audience.

    Beyond that, can we keep using remarketing via Adwords tag, at the same time? Is there a conflict with this?

  • Sayf Sharif

    Rubens, if you set up the second tracker correctly it shouldn’t interfere with your remarketing at all.

  • is it possible to serve the dc.js on the local server to overcome this issue?

  • Sayf Sharif

    I don’t generally recommend serving dc.js or ga.js locally, and I still wouldn’t in this case. I haven’t tested it, but I don’t believe that would solve the problem.

  • Thank you for sharing it, Sayf.

    I’m testing it currently, and my first observation is that the script source should actually be absolute, not relative.

    As it is, src=”advertising.js” will always point to a URL relative to the current page, and it will not always load (of course, the script does not reside in each and every folder).

    So for someone placing the script in the root URL of the site it should be . Right?

  • Sorry, the code was stripped from my previous post, so I’ll only post a part of it: src=”/advertising.js”.

  • Sayf Sharif

    Correct, have that refer to the correct location. You might want to also check out this solution:

    I might like theirs better than ours. Not to mention that a number of ad blockers look like they’re whitelisting the dc.js and we might not have to worry about this problem anymore, but I’m still investigating that.

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187