The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 03-16-2011, 03:36 AM
motion rush's Avatar
motion rush is offline
Junior Member
 
Join Date: Oct 2010
Posts: 13
Default

adding conversion tracking codes


hi i see that google analytics ID's can be entered in ecwid.

how about Conversion tracking scripts google and adcenter, these (they say) should go on sales receipt page - possible?

Please explain how.
I was told it's possible via JS. but need some guidance.

thank you
  #2  
Old 03-17-2011, 03:28 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Here is the JS code that should be present on your shop page:

Code:
function googleConversion() {
    var hash = document.location.hash;
    if (hash.indexOf('mode=orderConfirmation') > 0) {
      //Set vars
      google_conversion_id = Your Value;
      google_conversion_language = "en";
      google_conversion_format = "2";
      google_conversion_color = "ffffff";
      google_conversion_label = Your Value;
      google_conversion_value = Your Value;

      //Do conversion
      var headID = document.getElementsByTagName("head")[0];
      var newScript = document.createElement('script');
      newScript.type = 'text/javascript';
      newScript.src = 'http://www.googleadservices.com/pagead/conversion.js';
      headID.appendChild(newScript);

      clearInterval(pollTimer);
    }
}

pollTimer = setInterval(googleConversion, 100);
The values for the places where this code says 'Your value' are taken from the code Google generates for you (Reporting → Conversion → 'Your Conversion' → Code tab).

This code should be either inserted into the shop page enclosed in <script></script> tag, or saved into the file on your server and linked from the shop page via <script src="/url/of/your/file"></script>.

To test this solution out you need to mak a full purchase (including placing order) from an Adwords link.
  #3  
Old 03-29-2011, 01:21 AM
motion rush's Avatar
motion rush motion rush is offline
Junior Member
 
Join Date: Oct 2010
Posts: 13
Default

thanks eugene. I will look into it.

How about this (ADCENTER conversion)

Code:
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops"type="text/javascript"src="//flex.atdmt.com/mstag/site/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js"></script>
<script type="text/javascript">mstag.loadTag("conversion", {cp:"XXXX",dedup:"1"})</script>
<noscript><iframe src="//flex.atdmt.com/mstag/tag/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js/conversion.html?cp=XXXX&dedup=1"frameborder="0"scrolling="no"width="1"height="1"style="visibility:hidden;display:none"></iframe></noscript>
thanks for your help in advance
mrm
  #4  
Old 03-30-2011, 03:45 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by motion rush View Post
thanks eugene. I will look into it.

How about this (ADCENTER conversion)

Code:
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops"type="text/javascript"src="//flex.atdmt.com/mstag/site/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js"></script>
<script type="text/javascript">mstag.loadTag("conversion", {cp:"XXXX",dedup:"1"})</script>
<noscript><iframe src="//flex.atdmt.com/mstag/tag/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js/conversion.html?cp=XXXX&dedup=1"frameborder="0"scrolling="no"width="1"height="1"style="visibility:hidden;display:none"></iframe></noscript>
thanks for your help in advance
mrm
For this kind of tracker you can change the code the following way:

Code:
function trackConversion() {
    var hash = document.location.hash;
    if (hash.indexOf('mode=orderConfirmation') > 0) {
        //Set vars
        if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>


        //Do conversion
        var newScript = document.createElement('script');
        newScript.type = 'text/javascript';
        newScript.src = "//flex.atdmt.com/mstag/site/b5c71523-6bfe-XXX-XXX-XXXXXXX/mstag.js";

        newScript.onload = newScript.onreadystatechange = function(){
            mstag.loadTag("conversion", {cp:"XXXX",dedup:"1"});
        }

        document.getElementsByTagName("head")[0].appendChild(newScript);



        clearInterval(pollTimer);
    }
}

pollTimer = setInterval(trackConversion, 100);
Let me know how it worked.
  #5  
Old 04-26-2011, 06:47 PM
Owen Yee's Avatar
Owen Yee Owen Yee is offline
Junior Member
 
Join Date: Apr 2011
Posts: 1
Default

Hi Eugene,

There is a option in Adwords to import conversions from Google Analytics. Does this mean I do not have to add a conversion tracking pixel? I am also using two payment methods, Google Checkout and Paypal. Where exactly do I go to edit the code and enter "My Value?" Sorry I am newbie and not really a coder or web dev.

Thanks for your help.

Owen
  #6  
Old 02-17-2014, 11:01 AM
the dooup's Avatar
the dooup the dooup is offline
 
Join Date: Jan 2013
Posts: 5
Default

Does anyone know if you can apply two tracking codes? My adwords tracking code doesn't seem to be picking up conversions on the thank you page. As I already have a tracking code there for an affiliate company, would this affect the performance?
  #7  
Old 02-18-2014, 05:31 PM
Corwin's Avatar
Corwin Corwin is offline
Ecwid Team
 
Join Date: Jan 2014
Posts: 310
Default

You can add as many code snippets to the Thank you page as you need. They all will function properly as long as there are no errors in their code.

This is how the conversion tracking works: when a customer reaches the order confirmation page the code that you added for the conversion tracking is executed and the information is passed for further processing to the company that you use for conversion tracking. So in order to trigger conversion tracking you actually have to reach the final page of the checkout.

If you do not see any conversions this can be due to one of the following reasons:

- Incorrect tracking code.
- No orders were placed through your ad.
- Buyers didn’t reach the final page of checkout on which the conversion tracking code is executed.

To find out why the conversion tracking isn’t working please answer the below questions:

- Did you setup your Google AdWords account as described in this post?
- Is you tracking pixel verified in your Google Adwords account? You can check it’s status on Adwords dashboard -> Reporting and Tools -> Conversions page of your AdWords account.
- Have you tried placing a test order through your own ad?
__________________
Bulat F.,
Ecwid Team

help portal
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:57 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.