Solved

Custom Dimension - Session Level

Posted on 2013-11-18
1
214 Views
Last Modified: 2016-02-24
Hello,

I do need help regarding the custom dimensions. Initially, I use to track product pages, category pages and my different payment methods with custom variables.

After implementing google universal analytics, I am facing an issue. Not able to track anything. Please help me out.

ga('create', 'UA-1111111-1', 'xyz.co.uk');
                              ga('set', 'dimension2', 'abc'); // Product Pages
                        ga('send', 'pageview');

ga('create', 'UA-1111111-1', 'xyz.co.uk');
                              ga('set', 'dimension1', 'xyz'); // Category Pages
                        ga('send', 'pageview');

I do wish to track category pages, product pages and my payment methods like (COD, BT,CC) etc.

Please do help me out.

Thanks

Percy
0
Comment
Question by:david_php
1 Comment
 
LVL 1

Accepted Solution

by:
93jordanaj earned 500 total points
ID: 39754120
Hi Percy,

First of all, have you set up the custom dimensions within Google Analytics (admin > custom definitions (under property) > custom dimensions)?

Once you've done this, you then need to reformat the code to send the data:

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-1111111-1', 'xyz.co.uk');
ga('send', 'pageview', {
  'dimension1': 'Category page here',
  'dimension2': 'Product page here',
  'dimension2': 'Payment method here',
});

Open in new window


You've used the 'set' method which updates the value associated with a given field. However, because you haven't sent it using the 'send' method there's nothing to set. What this above code does is set the tracker and sends dimension1, dimension2 and dimension3 to GA.

Hope this helps.

Alex
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
Learn about the eCommerce marketing trends for the year ahead.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

777 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