1.9K members online now
1.9K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me

Adobe Muse issue

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I'm trying to implement the conversion tracking code into my website. I understand the process, but am having issues due to the fact that we've used Adobe Muse to create and mange the website. Muse does not allow direct access to the the HTML code. I CAN add HTML snippets to the <head> or <body>, but not modify the <body> tag itself.


For example I am able to add the tracking code to the <head> like this:

	<title>Sample HTML File</title>
	<script type="text/javascript">
	(function(a,e,c,f,g,b,d){var h={ak:"123456789",cl:"_ABcDEFg12hI34567jK"};a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)};a[f]||(a[f]=h.ak);b=e.createElement(g);b.async=1;b.src="//";d=e.getElementsByTagName(g)[0];d.parentNode.insertBefore(b,d);a._googWcmGet=function(b,d,e){a[c](2,b,h,d,null,new Date,e)}})(window,document,"_googWcmImpl","_googWcmAk","script");
	<body> This is the body of your web page.

  But I am NOT able to add the javascript snippet to the <body >tag like this:

<body onload="_googWcmGet('number', '1-800-123-4567')">

 Is there any way around this by perhaps running a script that changes the <body> tag.  Any help with this would be greatly appreciated

2 Expert replyverified_user

Re: Adobe Muse issue

[ Edited ]
Top Contributor
# 2
Top Contributor

Andrew, though this is certainly not an AdWords related question and I'm no JavaScript expert, I think jQuery might be your friend, nevertheless.

Here's a solution where you should change the function and add that script before the end of your head tag. Obviously, you'll need to include the jQuery script, preferably the latest version, before calling that function.


Later edit: And here's the link, too Smiley Happy.

Hope it helps. Let us know if it works.

Calin Sandici, AdWords Top Contributor | Find me on: Google+ | Twitter | LinkedIn | myBlog
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: Adobe Muse issue

Top Contributor
# 3
Top Contributor
Hi Andrew O,

You can't edit the body tag? Ok, there's a fairly simple solution with Javascript, but you can't call the _googWcmGet() function directly with it.

First create a function to wrap the call, then add that function to the body onload:

&lt;script type=text/javascript&gt;
function updatePhoneNumber (
_googWcmGet('number', '1-800-123-4567');
document.body.onload = updatePhoneNumber ;

The thing is you can't pass parameters to the function this way, that's why it's wrapped in another function. Note, use the bare function name, no quotes, no parentheses, no parameters.

I normally put this code just before the closing body tag. This won't work in the head section as there is no document.body object yet to modify. The HTML body tag will write over anything you do in the head section.

Best of Luck!

petebardo -- Deadhead doing AdWords

Re: Adobe Muse issue

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
If you use Adobe Muse, you can add the code to the pages by right clicking on the page and then clicking on Properties. One of the tabs allows you to add HTML code in the header.....which is where has to go in order to work. Google AdWords suggests adding the code in the header of your template pages, but I have found that if you ONLY add the code to the template pages your session times and bounce rates will be inaccurate. You need to add the code to each individual page.