0
votes

i'm currently trying to add a custom dimension to google analytics. The goal is to be able to have reports on what user did with their client_id. So i've added a "client_id" custom dimension in Admin->property Name: client_id scope: hit Active : true

Then in my code just after the head i add :

 gtag('config', 'UA-133344089-1', {
        'custom_map': {'dimension1': 'client_id'}
    });

    // Sends an event that passes 'client_id' as a parameter.
    gtag('event', 'client_id', {'client_id': 12});

But after that in a custom report where i add Metric group : pageviews And Dimension Drilldowns : client_id type:explorer

I can then see the data from yesterday, but can't check the data of today and be sure i've send the client_id correctly.

Is there any way to check that in real time, so i don't have to wait for tomorrow to check if i get the client_id in Google Analytics ? Also is this the good way to implement custom dimension to be able to see activities of each client (for exemple having a reporter with : Client_id:12, pageviews:20) ?

1

1 Answers

0
votes

Is there any way to check that in real time, so i don't have to wait for tomorrow to check if i get the client_id in Google Analytics ?

The real-time api does not include custom dimensions and metrics.

I can then see the data from yesterday, but can't check the data of today and be sure i've send the client_id correctly.

The standard reports take between 24 - 48 hours before they complete processing you will need to wait until then before you can check it.

Also is this the good way to implement custom dimension to be able to see activities of each client (for exemple having a reporter with : Client_id:12, pageviews:20) ?

This should work fine just remember that you will need to send it on all requests.