top of page
Search

Google Analytics: custom dimensions

  • Writer: Personal Chao yu
    Personal Chao yu
  • Jul 5, 2021
  • 2 min read

Updated: Jul 7, 2021

Google Analytics allow developers to collect custom data (parameters) and create custom dimensions to make use custom data. In this blog, i will try to go through the steps of creating custom dimensions and make use of the custom dimensions.

I will be using previous blog mentioned Search Event, in the search event I collected Search_item / Value. I will use the value and create a report and check the most searched strings.


  1. create dimensions

before we going to create our own dimensions, we will go check out the existing Dimensions and what we can do with it on a high level. I will take Engagement=> Pages And Screens section as an example.

To start playing around with dimensions, we need to click on



This will bring a panel on the right, where we can add and remove dimensions.

Say I would like to know the page views in the last 30 days segmented by City names. How would we do it.

Here is an interesting result, we can see now which city is more interested in which page. Based on your need, i believe you can make it much more interesting. Looks like our admin lives in the city called Vught, as that was the only traffic to the admin page.


Creating Customs Dimensions:


Notice the Dimension name, we will need it on our apex page. Event Parameter is used to passing data to this custom dimension, ( this is kinda strange to me, we know that the data is already collected by Google analytics, this step is more like a registering existing parameter rather than creating new. )

Let us save the above settings and go to our APEX page. On APEX page we need to do the following changes.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YOUROWNID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-YOUROWNID',{
      'custom_map': {'dimension2':  'search_term'
                    ,'dimension3':  'apex_user'
                    ,'dimension4': 'terminal'
                    ,'dimension5': 'tank_id'
                    ,'dimension6': 'action_type'  }
  });
</script>

see reference from google link;

Of course, when we trigger search event, we need to mention search_term and pass value to it. like this:

let val = apex.item( "P2_TANK_ID" ).getValue();
gtag("event", "search", {
  search_term: val,
  apex_user: '&APP_USER.'
});

Use Custom Dimensions:


Use Custom Dimension and create a report, please note that when you create a new dimension, you would only be able to use it after 24 hours.


- how to create a custom reports , chart or what have you.


Let us open this very simple report and find out what it is all about.

there are lots of informations on this page, to come up with a simple report.

To reach the goal of finding the most searched string, i set Technique as Free Form, visualisation as a flat table. Event Name and search_term as rows, I left columns empty and count events as Values.

Before we can use search_term , we need to click on the

plus sign next to DIMENSIONS and find search_term and add it.


To see search event only, i also made a filter for this report, which is here.


And the results.


Recap:

we have seen how to create custom dimension and make use of custom dimension. Use it in google analytics explorations.

In the next blog, we gonna explore custom metrics.

 
 
 

コメント


  • Facebook
  • Twitter
  • LinkedIn

Subscribe Form

©2021 by chaotic. Proudly created with Wix.com

bottom of page