Google Tag Manager and Volusion - Ecommerce Forums
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Google Tag Manager and Volusion

  1. #1

    Google Tag Manager and Volusion

    Has anybody gotten Google Tag Manager (GTM) to work with Volusion eCommerce tracking? I found a guide online, but it didn't work for me.
    http://ecommppc.com/2014/11/04/volus...e-tag-manager/

    I was able to add the container code to my template and the universal analytics tag fired properly. I could even get the eCommerce tracking tag to fire on the order finished page. The problem is with the data layer. With some debugging tools, I found the error was that it was below the container. I tried moving the container to the bottom of the template. Then the error was that the datalayer could not be within a DIV. Anything put in the ROI_Javascripts article is put in a DIV with the same name. I then moved the container code back to being just below the body tag and moved the datalayer code above that. I didn't get any errors from Google Tag Assistant, but when the eCommerce tag fired on the order finished page all of the fields in the Google Send command showed undefined and that the command was aborted.

    I am hoping one of you have figured this out.
    Last edited by OHC; 02-11-2015 at 08:57 AM.

  2. #2
    The author of the blog gave me something to try. I will post back if I can get it working.

  3. #3
    Iím getting closer. Not sure if it is needed, but from research I added a gtm.dom event to OrderFinished rule. It also appears that code is missing in the original article. I changed the line

    for(var i=0;i

    to this

    for(var i=0;i<OrderDetails.length;i++) {

    In my testing, it doesn't pass data the first time. It will show all of the fields such as "id: undefined". If I hit refresh then it will populate with the proper data. Sometimes I have to hit refresh twice to get it to populate the data. Very strange. Here is my current code:
    Code:
    <!-- Start - Google Tag Manager Transaction Script  -->
    <script>
    dataLayer = [{
    'transactionId': Order[0],
    'transactionAffiliation': 'CompanyName',
    'transactionTotal': Order[2],
    'transactionTax': Order[4],
    'transactionShipping': Order[5],
    }];
    </script>
    <script>
    var transactionProducts = [];
    for(var i=0;i<OrderDetails.length;i++) {
    transactionProducts.push({
    'sku': OrderDetails[i][2],
    'name': OrderDetails[i][3],
    'category': 'none',
    'price': OrderDetails[i][5],
    'quantity': OrderDetails[i][6]
    })}
    dataLayer.push({'transactionProducts': transactionProducts});
    </script>
    <!-- End - Google Tag Manager Transaction Script -->
    I have gone back to the old Universal Analytics script for now.

  4. #4
    The normal ecommerce code will not work with GTM. GTM uses data layers, so you'll have create some custom code for your checkout page. There are some resources out there, but I couldn't get anything to work either. I just ended up going back to hard-coding my analytics until I can find a way to get it to work.
    It's not fresh, but it's fruit.

  5. #5
    Has anybody gotten eCommerce tracking to work with GTM? I've found quite a few tutorials, but all are different, and none clearly say "just do this." Here is the code I used:
    Code:
    <script>
    dataLayer = [{
    'transactionId': Order[0],
    'transactionAffiliation': ‘RetroSound’,
    'transactionTotal': Order[2],
    'transactionTax': Order[4],
    'transactionShipping': Order[5],
    }];
    </script>
    <script>
    var transactionProducts = [];
    for(var i=0;i<OrderDetails.length;i++) {
    transactionProducts.push({
    'sku': OrderDetails[i][2],
    'name': OrderDetails[i][3],
    'category': 'none',
    'price': OrderDetails[i][5],
    'quantity': OrderDetails[i][6]
    })}
    dataLayer.push({'transactionProducts': transactionProducts});
    </script>
    I tried that with the tag set to fire on OrderFinished.asp. No luck. So I added the dom event. Still no luck. Another site I found said to use this code, and I also had no luck (with or without the dom event):
    Code:
    <script>
        dataLayer = [{
        "transactionId" : Order[0],
        "transactionAffiliation" : Order[3],
        "transactionTotal" : Order[2],
        "transactionShipping" : Order[5],
        "transactionTax" : Order[4],
        "transactionProducts" : [{
        "name" : OrderDetails[X][3],
        "sku" : OrderDetails[X][2],
        "price" : OrderDetails[X][5],
        "quantity" : OrderDetails[X][6]
        }]
        }];
    </script>
    I'm not sure what I'm doing wrong. Does anyone else here use GTM?
    Last edited by lucidardor; 07-09-2015 at 09:44 AM.
    It's not fresh, but it's fruit.

  6. #6
    Yes, I did finally get it to work. I ended up having to move the Google Tag Manager container script to just above the footer section in the template. I know it is recommended by Google to have it at the beginning, but that is the only place I could get it to work reliably.

  7. #7
    Oh that's interesting. Well mine is where they recommend it, and all of my tags are firing, except for the conversion tag which is on my thank you page. I really want to get this to work.
    It's not fresh, but it's fruit.

  8. #8
    I had the same issue. All the tags would fire except for the eCommerce tracking. However, if I hit refresh on the order confirmation page it would then work. I think it may be where the eCommerce tracking code was running. I seem to remember that Google prefers to see the datalayer defined before the container script runs. But with the tracking script on the order confirmation page I saw that it was below the GTM container script. When I moved the GTM container script just above the footer section of our template, it started working reliably.

  9. #9
    Thanks. I tried that, but I'm getting an issue when debugging my tags. Tag Assistant is saying "<script> tag must not be included in a <b>." The weird thing is that, there is no <b> anywhere where I installed the code. All the tags appear to be firing, though. I guess I just wait and see. Did Tag Assistant show any errors when you put it at the bottom?

    Also, are you noticing any skewed data from visitors in analytics? I've read that if you move the gtm code to the bottom, it's possible that the tags won't fire until after a page event has occurred (although I don't know how true that is).

    Oh yeah one more question, do you have the tag set to fire on the dom event and OrderFinished.asp? Or do you only have the rule for OrderFinished.asp?
    Last edited by lucidardor; 07-10-2015 at 11:51 AM.
    It's not fresh, but it's fruit.

  10. #10
    Yes, I do remember tag assistant giving an error. I don't think there is a way around it with Volusion. If you do a test order and voew source on the order finished page, you should be able to see what tag assistent is complaining about. I didn't notice any skewed results after the change. Actually eCommerce transactions seemed to be more reliable. Although it doesn't take much to skew results with the array of bots out there. Google Analytics seems more of an art than a science. With the views, filters and whatnot it can really eat up your available time.

    As far as the trigger, I created a Custom Event with a filter of event contains trackTransaction. I then used the following script in my OrderFinished.asp ROI_Javascripts:

    Code:
    <!-- Start - Google Tag Manager Transaction Script  -->
    <script>
    dataLayer = [{
    'transactionId': Order[0],
    'transactionAffiliation': 'Company Name',
    'transactionTotal': Order[2],
    'transactionTax': Order[4],
    'transactionShipping': Order[5]
    }];
    
    var transactionProducts = [];
    for(var i=0;i<OrderDetails.length;i++) {
    transactionProducts.push({
    'sku': OrderDetails[i][2],
    'name': OrderDetails[i][3],
    'category': 'none',
    'price': OrderDetails[i][5],
    'quantity': OrderDetails[i][6]
    })}
    dataLayer.push({
        'event': 'trackTransaction',
        'transactionProducts': transactionProducts
    });
    </script>
    <!-- End - Google Tag Manager Transaction Script -->

  11. #11
    Ok thanks man. I moved my code to the bottom on Friday, and it's still not tracking. I'll replace my code with what you just posted, and we'll see if there's any luck.
    It's not fresh, but it's fruit.

  12. #12
    Didn't work
    It's not fresh, but it's fruit.

  13. #13
    Quote Originally Posted by lucidardor View Post
    Didn't work
    Are any of the tags firing? Are you using GA debug in Chrome to see what is happening?

  14. #14
    Does this debug info make sense to you?

    Code:
    Mixed Content: The page at 'https://www.retrosound.com/OrderFinished.asp?Order=Finished&OrderID=2231' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://www.retrosound.com/SearchResults.asp'. This endpoint should be made available over a secure connection.
    Uncaught ReferenceError: valueInCents is not defined
    GET https://www.gstatic.com/trustedstores/js/gtmp_compiled_Ukutm_VRmyU.js net::ERR_CONNECTION_RESET
    Initializing Google Analytics.
    Running command: ga("create", "UA-4480211-1", {name: "gtm1436995881523"})
    Creating new tracker: gtm1436995881523
    Running command: ga("gtm1436995881523.set", "&gtm", "GTM-PVFMCV")
    Running command: ga("gtm1436995881523.set", "dimension4", "march2015")
    Running command: ga("gtm1436995881523.set", "hitCallback", [function])
    Running command: ga("gtm1436995881523.require", "displayfeatures", undefined, {cookieName: "_dc_gtm_UA-4480211-1"})
    Set called on unknown field: "dcLoaded".
    Plugin "displayfeatures" intialized on tracker "gtm1436995881523".
    Running command: ga("gtm1436995881523.send", "pageview")
    
    Sent beacon:
    v=1&_v=j37d&a=178274573&t=pageview&_s=1&dl=https%3A%2F%2Fwww.retrosound.com%2FOrderFinished.asp%3FOrder%3DFinished%26OrderID%3D2231&…99832.1436397391&tid=UA-4480211-1&gtm=GTM-PVFMCV&cd4=march2015&z=370026223
    
    
    <unknown>        (&gtm) GTM-PVFMCV
    _j1              (&jid) 
    adSenseId        (&a)   178274573
    apiVersion       (&v)   1
    clientId         (&cid) 122099832.1436397391
    dimension4       (&cd4) march2015
    encoding         (&de)  UTF-8
    flashVersion     (&fl)  18.0 r0
    hitType          (&t)   pageview
    javaEnabled      (&je)  1
    language         (&ul)  en-us
    location         (&dl)  https://www.retrosound.com/OrderFinished.asp?Order=Finished&OrderID=2231
    screenColors     (&sd)  24-bit
    screenResolution (&sr)  3200x1800
    title            (&dt)  RetroSound
    trackingId       (&tid) UA-4480211-1
    viewportSize     (&vp)  1298x378
    Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
    XHR finished loading: GET "https://587-events.olark.com/nrpc/c?c=create&u=https%3A%2F%2Fwww.retrosound…fec34ea5&q=precache039029387943446636&j=o0&version=loader-precache&xhttp=1".
    Executing Google Analytics commands.
    Running command: ga(Function)
    Creating new tracker: olark
    GET https://www.retrosound.com/cart.js 404 (Not Found)
    XHR finished loading: GET "https://www.retrosound.com/cart.js".
    XHR finished loading: GET "https://www.googlecommerce.com/trustedstores/gtmp_compiled.js".
    XHR finished loading: GET "https://s.adroll.com/j/roundtrip.js".
    XHR finished loading: GET "https://www.googleadservices.com/pagead/conversion_async.js".
    XHR finished loading: GET "https://www.retrosound.com/a/j/volusion.js?7.01.1.137".
    XHR finished loading: GET "https://www.retrosound.com/a/j/javascripts.js?6_5_7.01.1.137".
    XHR finished loading: GET "https://www.google.com/jsapi".
    XHR finished loading: GET "https://www.retrosound.com/v/vspfiles/assets/js/init-dropdown.js".
    XHR finished loading: GET "https://www.retrosound.com/v/vspfiles/templates/240/js/design_toolkit_min.js".
    XHR finished loading: GET "https://static.getclicky.com/js".
    XHR finished loading: GET "https://422a538d4318aae551f3-415223bed6e6eb1acd14fd7d1b66050b.ssl.cf5.rackcdn.com/store_GB574VCT7HWCGV6CFJXTW9MT45.js".
    XHR finished loading: GET "https://www.googleadservices.com/pagead/conversion.js".
    XHR finished loading: GET "https://cdn.inspectlet.com/inspectlet.js".
    XHR finished loading: GET "https://s7.addthis.com/static/menu.f6f41423549f23e741f6.js".
    XHR finished loading: GET "https://s7.addthis.com/static/hi-res-css.36b7e6ae8f600c7bea04.js".
    XHR finished loading: GET "https://www.google-analytics.com/analytics.js".
    XHR finished loading: GET "https://www.gstatic.com/trustedstores/js/gtmp_compiled_Ukutm_VRmyU.js".
    XHR finished loading: GET "https://s7.addthis.com/static/layers.9e29d3f03035b1084996.js".
    XHR finished loading: GET "https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-550c689a3760b377".
    XHR finished loading: GET "https://static.olark.com/jsclient-bucket3/application2.js?v=1433449337514".
    XHR finished loading: GET "https://www.retrosound.com/v/vspfiles/assets/js/makemodel.js".
    XHR finished loading: GET "https://api.olark.com/2.0/sites/2240-159-10-6028/visits?_callback=_olark_ca…qICoZh3Y9Sa826TF1KaCWQENI0Z%22%2C%22cache%22%3A%220.4596132554579526%22%7D".
    XHR finished loading: GET "https://in.getclicky.com/in.php?site_id=100850727&res=3200x1800&lang=en&sec…hout_currency%20%7D%7D&jsuid=2835964986&upset&mime=js&x=0.6461516122799367".
    XHR finished loading: GET "https://d.adroll.com/pixel/YONZ6D3SLZDYTCUEV55TXQ/AFGU5MQRTNBETGTUUD4YML?pv…WUQ2E%3A45%7CASLGJKJWXVAM3PIYWBVTOT%3A6%7C4JORB7TMIJEKDJ6ZCXQWCQ%3A2&keyw=".
    Last edited by lucidardor; 07-15-2015 at 02:34 PM. Reason: Wrong Code!
    It's not fresh, but it's fruit.

  15. #15
    The first mixed content error is your search box is hard coded http. That causes an error on https pages. You currently have this:
    PHP Code:
    action="http://www.retrosound.com/SearchResults.asp" 
    I would change it to this:
    PHP Code:
    action="/SearchResults.asp" 
    As for the rest, it is a little out of my league. I was mistaken as to where I placed the GTM container script though. It was below the footer just above the following section:
    PHP Code:
    <!--==========================================================================================
          
    VOLUSION LINK BEGIN
          
    ==========================================================================================
          
    Customer has agreed per Volusion's Terms of Service (http://www.volusion.com/agreement_monthtomonth.asp) to maintain a text hyperlink 
          to "http://www.volusion.com" in the footer of the website. The link must be standard html, contain no javascript, and be approved by Volusion. 
          Removing this link breaches the Volusion agreement.
          --> 
    I'll pm you my site link so you can take a look.

Similar Threads

  1. Google penalizes Volusion
    By davidj in forum Volusion News
    Replies: 45
    Last Post: 06-01-2014, 10:34 PM
  2. From Volusion: How to Improve SEO with Google Authorship
    By Spesh in forum Search Engine Optimization
    Replies: 15
    Last Post: 06-07-2013, 12:58 PM
  3. Google Tracking Manager-Anyone Use?
    By GentleBath in forum Analytics
    Replies: 6
    Last Post: 12-11-2012, 07:22 AM
  4. Zoho and Volusion as product manager
    By goodpersona in forum Inventory/Order Management
    Replies: 5
    Last Post: 08-12-2012, 09:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •