AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.7K members online now
1.7K members online now
Get started with Google Ads - learn the basics to get set up for success
Guide Me

Inserting Remarketing Tags

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm looking to load the Google Code for Remarketing  to a WYSIWYG website. The editor of the website is parsing out <SCRIPT> tags on page layouts... but it does allow <SCRIPT> tags in the footer area. 


Could I save the Google Code for Remarketing  to a .js file,  then upload that file and link to it from the footer?
Would that be okay with Google, would that even work?


var google_conversion_id = 9876543210;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;

<script type="text/javascript" src="//"></script>

<div style="display:inline;"><img height="1" width="1" style="border-style:none;" alt="" src="//;guid=ON&amp;script=0"/></div>

Then I would insert <script src="../remarketing-code.js" async></script> into the footer.
Would this work?

It's a small one line footer field I'm working with, just 250 character limit.
Open to any suggestions.

Was also thinking, much like the script src thing, using iframe instead... could the script even function within the encapsulated iframe?


2 Expert replyverified_user

Re: Inserting Remarketing Tags

Top Contributor
# 2
Top Contributor

Hi @Jason J,


It can be loaded from an external file but you will need to wrap the code with a function that fires it with page load on all pages. Putting simply the code in an external file and linking to the page with <script> tag should not work. 


Ratan Jha
Join me on Google+   |   Tweeter

About Me: Community Profile | Ratan Jha INC.
If this or any other post solved your question, do not hesitate to accept it as the solution.

Re: Inserting Remarketing Tags

Top Contributor
# 3
Top Contributor
Hi Jason J,

No, you can't do this with an external .js file, at least not the way it is.

Many of the WYSIWYG eidtors allow you to crate a "widget" or something similarly named. The idea would be to create the widget, include the remarketing code shown above, then add that widget to the footer for the site.

Best of Luck!

petebardo -- Deadhead doing AdWords