Google Analytics Variables - use my own instead of Google's

Posted on 2014-08-21
Last Modified: 2016-02-24
The variables in my website's cart are different from those that Google specifies in their dataLayer example for transaction level tracking.  See below. Instead of transactionTotal I want to use totalPrice. I also do not want to be required to use all of those variables; this is purely so I can install this code in Google Tag Manager and track transactions in my analytics.
Question by:Randy Cole
    LVL 81

    Accepted Solution


    Author Comment

    by:Randy Cole
    Thanks leakim971, that does not specifically address the way I can do this with GTM. I will continue to look for solutions and will dig deeper in the article you linked to. At this time I cannot award points, but I can keep searching and will award once I find the solution.

    For anyone else out there following this thread, Google Support led me to creating a macro for AdWords tracking and I will experiment with that as a solution for analytics tracking. However, my research is making me believe that I cannot customize variables in Analytics eCommerce tracking.

    Author Comment

    by:Randy Cole
    Leakim971 set me on the correct path. For others trying to do the same thing - create a macro in GTM and call the macro from the VALUE box of your Adwords Conversion tag. The macro I built was a constant string with a value if (<%= TotalPrice %>) {   var google_conversion_value = <%= TotalPrice %>;   }   (my variable is called TotalPrice).

    This worked for me.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now