Post by ASG » Fri Jan 29, 2016 7:22 pm

I had been looking for an answer to this for last couple of days, and almost all of the solutions I came across involved modifying code in the tpl files. And even then it wouldn't work depending on the Opencart version you had.

So I requested support from Google adwords team, and their integration team called me up. You can follow the following steps to have adwords conversion tracking added for your site. It is as easy and similar as integrating Google analytics code. Also, it is provided by Google themselves, and has been working like a charm for me.

1. Get the conversion code which should look like the following:

Code: Select all

<!-- Google Code for Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "K4nGDFGS6xWMQAsaa2AM";
var google_remarketing_only = false;
/* ]]> */
</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="//www.googleadservices.com/pagead/conversion/1234567890/?label=K4nGDFGS6xWMQAsaa2AM&guid=ON&script=0"/>
</div>
</noscript>
2. Login to your site's admin. And head to SYSTEM > SETTINGS > SERVER TAB.

3. Scroll down to Google Analytics section. (Yes, you read that correct - the Analytics section)

4. Copy the following line from the above code:

Code: Select all

src="//www.googleadservices.com/pagead/conversion/1234567890/?label=K4nGDFGS6xWMQAsaa2AM&guid=ON&script=0
5. And modify it to the following code:

Code: Select all

<script type="text/javascript">
setTimeout(function(){ 
if(window.location.href.indexOf('route=checkout/success')>-1){
(new(Image)).src="//www.googleadservices.com/pagead/conversion/1234567890/?label=K4nGDFGS6xWMQAsaa2AM&guid=ON&script=0";
}
}, 1000);
</script>
6. Now, paste the entire script(including <script></script> right below where the analytics code ends. And hit Save.

That's it. You can check functioning of the same using google tag manager extension in Chrome, or Tools > Conversions in the adwords dashboard.

ASG
Active Member

Posts

Joined
Tue Sep 30, 2014 11:03 pm

Post by EvolveWebHosting » Sat Jan 30, 2016 1:11 am

That will work or you can use Google Tag Manager for your analytics, adwords, etc.

I just set another one up yesterday and it was easy to do.

Image
https://www.evolvewebhost.com
$10.49 .com Registration and $9.99 .com Transfers in now
Guaranteed top level opencart performance and support. Risk free 30 day money back guarantee & free transfers.
Image


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by st_man » Tue Mar 01, 2016 4:28 am

What if I have 3 or 4 google ads and am testing them to see which produces "checkouts" best. Would I put the code in 3 times, once for each ad or would that trigger a success for all the ads?

New member

Posts

Joined
Sun Jan 26, 2014 6:13 am

Post by Jaap » Thu Oct 27, 2016 12:34 am

This solution is working almost perfectly.
But ...
I set up everything as described and in Google i choose the option:
everytime another value if not, value €20.=

But al my conversions are €20.=, where i like to have the sales value showing up.
Am i doing something wrong, or should i change something in the code?

Lint Kopen https://lintenkopen.nl/


User avatar
Active Member

Posts

Joined
Fri Apr 15, 2011 12:10 am
Location - the Netherlands

Post by DavetheCat » Fri May 05, 2017 8:14 pm

Hello,
I need to add Adwords conversion tracking code to my OC shop (v2.1.0.1) but I can't see a "Google Analytics" section in my 'Settings' > 'Server' area. Is the Google Analytics area somewhere different in my OC version, or should I put the code in elsewhere? I'm quite happy to add it into a tpl file if needed, but I don't know which file to go to.
Any advice on this appreciated!

User avatar
Newbie

Posts

Joined
Wed Nov 04, 2015 2:44 am

Post by Ricky112 » Mon Oct 02, 2017 8:01 pm

I have a similar question to the AP.

I want to set up Adwords conversion tracking and have somewhere to enter the profit I make on each product so I can make a profit/loss analysis drilled down by product.

I cannot see this feature on any of the extensions.

We can code it in-house if necessary but wondered if anyone had any tips ?

Newbie

Posts

Joined
Thu Aug 04, 2016 1:07 am
Who is online

Users browsing this forum: No registered users and 39 guests