AdWords
5K members online now
5K members online now
Get started with AdWords - learn the basics to get set up for success
Guide Me
star_border
Reply

How to add remarketing tag in Drupal site as there's no html page?

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi Guys,

 

I was trying to use remarketing tag but the instruction says to put the tag before <body> tag, in html.

But I was running a Drupal site. 

Would appreciate if any one can share how to do that?

 

 

Best

Peter

Re: How to add remarketing tag in Drupal site as there's no html page?

Collaborator ✭ ✭ ✭
# 2
Collaborator ✭ ✭ ✭

Hello Exvita ! Welcome to the Community !

 

Analytics works as a module in the Drupal setup. You can download it from here

 

https://drupal.org/project/Google_Analytics

 

The remarketing simply changes the analytics tracker to a doubleclick.net service tracker. To use it use the patch in the green space from this article

 

https://drupal.org/node/1741514#pift-results-1741514

 

 

Re: How to add remarketing tag in Drupal site as there's no html page?

[ Edited ]
Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi Adrian

 

Thanks for the tip.

I already used Google_Analytics module.

so after checking you link and instruction, I still find two problems.

1, to change it to a double click script, but how to install that patch?

Also it's for Drupal 6.x, and I'm used 7.22. Is it compatible?

2, I also ready more in google support, this link, 

https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad

is this the same as you mentioned?

my GA tracking cods is like below, is it done already?

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxx']);
_gaq.push(['_setDomainName', 'mysite.net']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src=('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

what I do about that or only need to install that patch?

 

Thanks,

 

Peter

Re: How to add remarketing tag in Drupal site as there's no html page?

Collaborator ✭ ✭ ✭
# 4
Collaborator ✭ ✭ ✭

I think it is best if you ask in that drupal thread about the patch compatibility with superior versions.

 

If you apply the patch and it does not work you can simply reinstall the analytics module.

 

You can check if the code is working through the "Google tag assistant" a plug-in for chrome or firefox.

 

https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk?h...

Re: How to add remarketing tag in Drupal site as there's no html page?

[ Edited ]
Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

Hi Adrian,

 

Thanks, you know I'm not a Drupal expert. 

So you suggestions leads me one question after anotherSmiley Happy 

I finally find ways to apply patch, (which I need to add new module as Views Bulk Operations, Entity API, Patch manager), but after I apply the 7.x patch. I still get error page.

As below.:

No idea how to proceed.

Any suggestions? Or is there's simple way?

Thanks,

 

  • Patching did not go smoothly.
  • This command was issued: /usr/bin/patch -p1 --verbose -d '/home/hotellin/public_html/sites/all/modules/google_analytics' -i '/home/hotellin/public_html/sites/default/files/patches/google_analytics-1.x-doubleclick-7.x_2.patch'
  • This was the output from patch:
    Hmm...  Looks like a unified diff to me...
    The text leading up to this was:
    --------------------------
    |diff --git a/googleanalytics.admin.inc b/googleanalytics.admin.inc
    |index a726186..8d68829 100644
    |--- a/googleanalytics.admin.inc
    |+++ b/googleanalytics.admin.inc
    --------------------------
    Patching file googleanalytics.admin.inc using Plan A...
    Reversed (or previously applied) patch detected!  Assume -R? [n]
    Apply anyway? [n]
    Skipping patch.
    Hunk #1 ignored at 354.
    1 out of 1 hunk ignored -- saving rejects to file googleanalytics.admin.inc.rej
    Hmm...  The next patch looks like a unified diff to me...
    The text leading up to this was:
    --------------------------
    |diff --git a/googleanalytics.install b/googleanalytics.install
    |index b696081..1e7dbd7 100644
    |--- a/googleanalytics.install
    |+++ b/googleanalytics.install
    --------------------------
    Patching file googleanalytics.install using Plan A...
    Reversed (or previously applied) patch detected!  Assume -R? [n]
    Apply anyway? [n]
    Skipping patch.
    Hunk #1 ignored at 41.
    1 out of 1 hunk ignored -- saving rejects to file googleanalytics.install.rej
    Hmm...  The next patch looks like a unified diff to me...
    The text leading up to this was:
    --------------------------
    |diff --git a/googleanalytics.module b/googleanalytics.module
    |index fd43704..5e0850d 100644
    |--- a/googleanalytics.module
    |+++ b/googleanalytics.module
    --------------------------
    Patching file googleanalytics.module using Plan A...
    Hunk #1 FAILED at 264.
    Hunk #2 FAILED at 275.
    2 out of 2 hunks FAILED -- saving rejects to file googleanalytics.module.rej
    Hmm...  The next patch looks like a unified diff to me...
    The text leading up to this was:
    --------------------------
    |diff --git a/googleanalytics.test b/googleanalytics.test
    |index 9015f4d..fc4d3fa 100644
    |--- a/googleanalytics.test
    |+++ b/googleanalytics.test
    --------------------------
    Patching file googleanalytics.test using Plan A...
    Hunk #1 succeeded at 146 with fuzz 2 (offset 28 lines).
    done
  • Performed Apply patch on 1 item.

 

Re: How to add remarketing tag in Drupal site as there's no html page?

Collaborator ✭ ✭ ✭
# 6
Collaborator ✭ ✭ ✭

From this line I understand that it may have worked, although the way to be sure is to check with the Google tag assistant after visiting your website. Also you can use the drupal forum to find answers. I am not a user of Drupal + remarketing .

 

Hunk #1 succeeded at 146 with fuzz 2 (offset 28 lines).
done

Re: How to add remarketing tag in Drupal site as there's no html page?

[ Edited ]
Follower ✭ ☆ ☆
# 7
Follower ✭ ☆ ☆

Hi Adrian,

 

Thanks, I checked with TAG ASSISTANT.

And I don't find 0 in my site.

I already post an issue on Drupal site.

Hope I can get some help there as well.

Thank you for your time.

 

Best Regards,

Peter

Re: How to add remarketing tag in Drupal site as there's no html page?

Collaborator ✭ ✭ ✭
# 8
Collaborator ✭ ✭ ✭

At least reinstall the Analytics module in order to keep track of visits until you receive a solution for the remarketing tag. 

 

From what the script is doing I see that it tries to modify this file googleanalytics.admin.inc , maybe in it is the tracking code exactly as provided in the Admin in the analytics interface and you can modify only that file. So first search that file and inside it search for a line like "_gaq.push(['_trackPageview']);"

Re: How to add remarketing tag in Drupal site as there's no html page?

Follower ✭ ☆ ☆
# 9
Follower ✭ ☆ ☆

Hi Adrian,

 

And after I find that string, what to do? 

 

Arrrh, I'm getting confused now.

Let me explain.

I find there's instructions both in Analytics, and Adwords.

I don'w know what's what, and which is the one I need.

 

Here's my current problems.

1, I'm using google analytics module for drupal. and setting as attached seem right.

But when checking use chrom tag assistant, no tag is found.

2, I don't know which steps to follow to set up using Analytics or Adwords or both.

I also attached the Analytics and Adwords related contents. 

Could you kindly instruct?

3, why I can't delete these remarketing tag in Analytics and Adwords?

 

Can you help to check again, what you think is wrong there?

Many many many thanks,

 

Best Regards,

Peter

 

analytics setting.jpganalytics setting.jpganalytics tracking code.jpgadwords audiences page setting.jpgadwords audiences page remarkting tag code.jpg

Re: How to add remarketing tag in Drupal site as there's no html page?

Follower ✭ ☆ ☆
# 10
Follower ✭ ☆ ☆

BTW, the issue I posted on https://drupal.org/node/1741514

didn't get any replies yet. It's not so active as here.