Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a patch that allows you to select whether you'd like the standard Google Analytics URL (www.google-analytics.net/ga.js) or the Double Click URL (stats.g.doubleclick.net/dc.js). That's it.
I added a flag in the Admin screen so one can make the change there. The default remains the same.
The reason behind using the Double Click is to enable tracking of AdWord along Google Analytics and as a result get better advertising in front of our customers.
Thank you.
Alexis Wilke
Comment | File | Size | Author |
---|---|---|---|
#42 | 20130619164022.jpg | 321.48 KB | exvita |
#35 | 1741514-doubleclick-6.x-backport.patch | 5.27 KB | John Franklin |
#25 | 1741514+Use+the+doubleclick.net+URL+instead+of+the+google-analytics.com+on.patch | 8.08 KB | hass |
#14 | Screenshot.png | 103.3 KB | AlexisWilke |
#9 | google_analytics-1.x-doubleclick-7.x.patch | 4.65 KB | drinkynet |
Comments
Comment #1
hass CreditAttribution: hass commentedD7 first, please. There are unrelated code style changes that need to be corrected. Please keep the current code style. The tracking url setting should be made more generic. We had one request in past to support a beta tracker url, too. I have not found docs about this and closed the case for this reason. I'm not sure if more spamming advertising networks come up in near future that use the same logic. Let's use a selectbox.
Comment #2
AlexisWilke CreditAttribution: AlexisWilke commentedI don't have 7.x. But if others using 6.x wanted the capability, it's in my patch. I also don't see the need to make my patch better since it's for 6.x.
As for the doubleclick feature, if you go to GoogleAnalytics, you'll see a checkbox when you go get the code. Click on the doubleclick checkbox and you'll see that the code changes the way I have it in my patch. I would imagine 7.x will do the same thing.
Thank you.
Alexis
Comment #3
drinkynet CreditAttribution: drinkynet commentedI've recently run into the need to swap out the standard library for the doubleclick one to enable AdWords remarketing features at work too.
Here is a patch that adds a switch to the advanced settings which allows you to choose between the standard Google Analytics tracking package and the Google Doubleclick package.
Its based on this Google article:
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2444872
Switching to the Doubleclick library has a privacy policy implication, a note about this is included in the description on the doubleclick radio field.
Comment #4
hass CreditAttribution: hass commentedThere are TABs and trailing spaces inside. Please make sure the patch is not ignored by the test robot. Please also extend the tests. Otherwise the patch looks ok to me.
Comment #5
drinkynet CreditAttribution: drinkynet commentedAhh TABs & trailing space :( added a test for the alternate library
Comment #7
drinkynet CreditAttribution: drinkynet commentedRetrying the test
Comment #8
hass CreditAttribution: hass commentedTrailing space
Comment #9
drinkynet CreditAttribution: drinkynet commentedThis time without the trailing spaces :)
Comment #10
remkovdz CreditAttribution: remkovdz commentedIs this already included in a new release of the Google Analytics module?
Comment #11
drinkynet CreditAttribution: drinkynet commentedI wouldn't have thought so, as this issue is still in the needs review state.
Comment #12
hass CreditAttribution: hass commentedI'd like to commit this as close as possible to the wordings used on the Google site, but in my German account I still don't see this doubleclick stuff. Can someone share a screenshot from his account Tracking Code tab, where you can enable all features and Google generates the code for your site, maybe anonymized if have a problem with the details.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedTo activate this option on Google Analytics site you must update your tracking code using stats.g.doubleclick.net/dc.js in your site: http://support.google.com/analytics/bin/answer.py?hl=en&answer=2611270 and to see a screenshot: http://support.google.com/analytics/bin/answer.py?hl=en&answer=2611404
Regards,
Comment #14
AlexisWilke CreditAttribution: AlexisWilke commentedDo a View Image to see it 1:1 scale.
Comment #15
hass CreditAttribution: hass commentedTHX, I really do not have this checkbox in my account... :-(
Comment #16
drinkynet CreditAttribution: drinkynet commentedDo you have an AdWords account linked to your Analytics account?
Comment #17
hass CreditAttribution: hass commentedNo. But AdWords is a different checkbox and I see this AdWords checkbox. I guess the feature is tooo new and it takes Google many months to enable it for all accounts.
Comment #18
remkovdz CreditAttribution: remkovdz commentedIt says here exactly how the tracking code should be modified:
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2444872
There is no need to see a checkbox in your Analytics account since we don't copy the code that is supplied there: we use the one generated by the Google Analytics module.
Comment #19
hass CreditAttribution: hass commented@remkovdz: Put mind in gear, before opening mouth! thx
Comment #20
remkovdz CreditAttribution: remkovdz commentedSorry, just trying to help :)
Comment #21
drinkynet CreditAttribution: drinkynet commentedIt's a feature that is being rolled out at the moment see this: http://analytics.blogspot.ca/2012/07/a-simpler-way-to-reconnect.html
You need an AdWords account hooked up to your Analytics account to qualify for the additional buttons in Analytics, and they are being rolled out over the summer.
This explains the remarketing feature better:
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2611268&t...
Comment #22
drinkynet CreditAttribution: drinkynet commentedSome of our other Analytics accounts now have this feature rolled out to them, do you see the boxes yet?
Comment #23
remkovdz CreditAttribution: remkovdz commentedI can confirm my Analytics accounts now show the option for Remarketing Lists (Netherlands).
Comment #24
hass CreditAttribution: hass commentedIs one of you guys a native English speaker? What is better/correct:
t('Search and Advertising')
ort('Search and Advertisement')
?Comment #25
hass CreditAttribution: hass commentedNew patch with a caching bug fixed. I moved it below previous Search and AdSense section and renamed the sections.
Comment #26
hass CreditAttribution: hass commentedCommitted to D7 http://drupalcode.org/project/google_analytics.git/commit/dd9cda1
If someone needs this for D6, jump in and backport, please.
Comment #27
remkovdz CreditAttribution: remkovdz commentedI just downloaded the latest dev, however I don't see the patch changes in the dev-files?
Comment #28
hass CreditAttribution: hass commentedDEV's will be refreshed once every 12 hours only. Please be patient it's only 5 hours from now...
Comment #29
remkovdz CreditAttribution: remkovdz commented:-) Did not know that, thanks.
Comment #30
drinkynet CreditAttribution: drinkynet commentedt('Search and Advertising')
is probably better since Advertising is what you are doingComment #31
remkovdz CreditAttribution: remkovdz commentedWorks great!
Comment #32
AlexisWilke CreditAttribution: AlexisWilke commentedYes, I concur.
t('Search and advertising')
is better.I would remove the capital on the A though because Drupal rules say so...
Comment #33
hass CreditAttribution: hass commentedOk. I make it lowercase. I may flip the words...
Advertising and search
Comment #35
John Franklin CreditAttribution: John Franklin commentedA backport of #25 to 6.x. (against 6.x-3.5.)
Comment #36
hass CreditAttribution: hass commentedThis needs to apply against DEV
Comment #37
hass CreditAttribution: hass commented#35: 1741514-doubleclick-6.x-backport.patch queued for re-testing.
Comment #38
rooby CreditAttribution: rooby commentedPatch in #35 applies cleanly to 6.x-3.x-dev.
Comment #39
rooby CreditAttribution: rooby commentedAlso seems to work fine.
Comment #40
hass CreditAttribution: hass commentedCommited to D6.3, http://drupalcode.org/project/google_analytics.git/commit/b7957f6
THX.
Comment #42
exvita CreditAttribution: exvita commentedHi, I was trying to add a REMARKETING TAG of google analytics.
I guess this is the one that can solve that problem?
I update it with "google_analytics-1.x-doubleclick-7.x.patch"
But I get attached warning, it's not successful.
Could you please advise if I did it right, and if not, how to do it?
Thanks.
Comment #43
FiNeX CreditAttribution: FiNeX commentedWould be possible to have this patch applied on 7.x too?I'm sorry, I didn't see the option already available on Google Analytics settings.