Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Custom Dimension - Session Level

Posted on 2013-11-18
1
Medium Priority
?
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
93jordanaj earned 2000 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Whoever said that “a picture is worth one thousand words” observed a fact that can dramatically affect your marketing success. Most people tend to learn visually, so many publishers commonly acknowledge the effectiveness of visual learning by using…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

730 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