Quantcast
Channel: WordPress – Wayne Connor
Viewing all articles
Browse latest Browse all 13

How to set up custom dimension tracking in wordpress

$
0
0

I wanted to compare 2 different wordpress themes.

I’m using a plugin called SES theme test or something like that and it swaps between 2 themes so I den test them. But I need to set up analytics to gather the data as follows:

 

1. Set up google analytics to look for custom variables.

Firstly go to your analytics interface and click on the ‘Admin’ tab (blue) then on the ‘Properties Settings’ (here it’s selected – orange.

Firstly go to your analytics interface and click on the 'Admin' tab (blue) then on the 'Properties Settings' (here it's selected - orange.

 

Screen Shot 2015-01-12 at 8.26.36 pm

Now go down and click on ‘Custom Definitions’ (above) then on Custom Dimensions (below.)

Screen Shot 2015-01-12 at 8.26.44 pm

 

 

 

Then click on ‘New Custom Dimension’ button

 

 

 

 

Screen Shot 2015-01-12 at 8.26.53 pm

 

Then fill in the ‘Name’, i just entered ‘theme name’. It’s just for your own reference.

Screen Shot 2015-01-12 at 8.28.27 pm

 

It will then show you the code to add to your theme:

Screen Shot 2015-01-12 at 8.23.27 pm

 

 

STEP 2, add code to theme

REplace ga(‘send’, ‘pageview’);
with:

ga(‘send’, ‘pageview’, {
‘dimension1′: ‘get(‘Name’) ?>’
});

Now analytics will pick up the theme name.


Viewing all articles
Browse latest Browse all 13

Trending Articles