SOLVED

Using HTML tokens on a Campaign Level - Help

Go to solution
Anonymous
Not applicable

Using HTML tokens on a Campaign Level - Help

To preface this discussion, I have my landing pages set up with tokens with rich text and text fields - just as an FYI that I understand tokens and everything is working well on this front.

My problem comes in to play with the HTML element. So I don't have to open my landing pages at all and just edit them from the token section, I am trying to figure out if it is possible to have the HTML element replaced with a token on the campaign level folder so it can be applied to all my programs in that campaign folder. On our landing pages, we have remarketing script for Google Adwords in which I use the HTML element. In case it needs tweaking, as it does once in awhile, it would be nice to make one change on the campaign level folder in the token without having to open every single landing page and making a change. My problem is that in the token section of the campaign level folder, or any token section for this matter, it does not have the HTML element. It has rich text and just text, but will those tokens work for the HTML element? If so, is one better than the other? 

Since I do not know much about GA, I am weary to try this, and don't want to lose tracking for my web team. Just trying to make it easier going forward. Anyone have an answer to this?
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Casey_Grimes
Level 10

Re: Using HTML tokens on a Campaign Level - Help

Hey Jesse,

So, it's important to note here that when it comes to HTML, CSS and JS, computers don't care about line breaks; those are only put in to make things more readable to humans. However, Marketo text tokens, unlike rich text tokens, don't really work well with line breaks. So, what you would do in the case of this particular script is once again have

{{my.adwords}} towards the bottom of your page (near the closing </body> tag) and then have the following as a plain text token:

<script type="text/javascript">/*<![CDATA[ */var google_conversion_id=106316;var google_custom_params=window.google_tag_params;var google_remarketing_only=true;/*]]> */</script><script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript><div style="display:inline;"><img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/106316/?value=0&amp;guid=ON&amp;script=0"/></div></noscript>

Hope that makes sense!

View solution in original post

5 REPLIES 5
Casey_Grimes
Level 10

Re: Using HTML tokens on a Campaign Level - Help

Hey Jesse,

You have a couple of options here. One would be to go the "just text" route and place something like <script>{{my.adwords}}</script> in your template, where you would put your remarketing script in the text token (albeit with line breaks stripped out.) That way, you could still use your campaign-folder level tokens for the landing pages in quesiton. Alternately, you could look into using Google Tag Manager, which is used to solve this problem in non-Marketo contexts for selective placement of multiple remarketing tags.
Anonymous
Not applicable

Re: Using HTML tokens on a Campaign Level - Help

Thanks, Courtney! I really appreciate your help! The only last question, when you say with the line breaks stripped out - I understand some html, but why would I strip those out? I know the text is all on one line, but would it mess things up to keep them in (I don't even see any)? This is my remarketing code below, do I have to do anything to that? I don't see breaks:

<!-- Google Code for Remarketing Tag -->
<!--------------------------------------------------
Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
--------------------------------------------------->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 106316;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/106316/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

Again, thanks for your help!
Casey_Grimes
Level 10

Re: Using HTML tokens on a Campaign Level - Help

Hey Jesse,

So, it's important to note here that when it comes to HTML, CSS and JS, computers don't care about line breaks; those are only put in to make things more readable to humans. However, Marketo text tokens, unlike rich text tokens, don't really work well with line breaks. So, what you would do in the case of this particular script is once again have

{{my.adwords}} towards the bottom of your page (near the closing </body> tag) and then have the following as a plain text token:

<script type="text/javascript">/*<![CDATA[ */var google_conversion_id=106316;var google_custom_params=window.google_tag_params;var google_remarketing_only=true;/*]]> */</script><script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript><div style="display:inline;"><img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/106316/?value=0&amp;guid=ON&amp;script=0"/></div></noscript>

Hope that makes sense!
Anonymous
Not applicable

Re: Using HTML tokens on a Campaign Level - Help

Yeah, I see what you're saying now. Makes perfect sense, Courtney! Thanks again!! 🙂
Jayanto_Sukul_S
Level 2

Re: Using HTML tokens on a Campaign Level - Help

Hi Jessy/Coutney,

Thanks for the concern and answer on this. I found very helpful, was in same condition today and its work perfectly for me by using the localized token.

Regards,

Jayanto