GA4 | Custom Dimensions *

Making Events OursCreating Custom Dimensionsmore ...

GOOGLE EVENTS | MAKING THEM OURS

https://support.google.com/analytics/answer/9322688

 

Types of events

The following types of events are collected automatically:

You must implement the following types of events in order to see them in Analytics:

  • Recommended events are events that you implement, but that have predefined names and parameters. These events unlock existing and future reporting capabilities.
  • Custom events are events that you define. Make sure you only create custom events when no other events work for your use case. Custom events don't show up in most standard reports so you need to set up custom reports or explorations for meaningful analysis.

 

RECOMMENDED EVENTS: https://support.google.com/analytics/answer/9267735

I try to keep as close to events google already has set up because they are useful / or sometimes necessary since using them allows you to tie into their pre-made reporting and other reports.

PURCHASE

I followed googles rules for purchase event – since it connects to so many other reports –

https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#purchase – you can find what metrics you can expect from that event here.

purchase

everything on here is required by google to make the event show up –

 


event: "purchase",
currency: "USD", (any money - they want the currency as well)
    transaction_id: "RGNATIVE:7bd78cd0d177dbde5336db3b385b0135", (pulled from nats)
    value: 15, (value - Total value of the transaction or the order - if there were multiple items)
    items: [
      {
        item_id: 3176, (nats optionID)
        item_name: "1 Month|$|15|.00||50% Off For Life!", (name pulled from nats backend)
        affiliation: "508184", (nats member)
        coupon: null, (we have to talk about - work out how to set these up)
        discount: 0,(we have to talk about - work out how to set these up)
        item_brand: "NS", (site from NATS)
        item_category: "Membership", (set statically now - we can discuss what might be better)
        price: 15, (Definition: The item’s price, as indicated by its currency code.)
        quantity: 1
      }
    ],

 

SIGN_UP

they really don't have anything that matches up with our membership sign up process. If you look under what they have for online sales on this page: https://support.google.com/analytics/answer/9267735?sjid=15667722431667170550-NA – you'll see that we don't do any of that.

GOOGLE SIGN_UP

https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=15667722431667170550-NA

Sign_up is also anemic. So what I did for that was to EXPAND it to include everything we can get from the NATS code as well as as much of the stuff we need / can get from purchase events.

We have a secret weapon – the NATS code -I am decoding it and putting all of the individual pieces up – that we should be able to search / sort / get reports for.

WHAT A NATS CODE CONTAINS:

https://tmmwiki.com/index.php/NATS4_NATSCode#Decoding_a_NatsCode

and the decrypted nats code – broken down by the site and info sent to google as:


nats_AffiliateID: "105488",
nats_ProgramID: "13",
nats_SiteID: "1",
nats_SiteName: " NakedSword",
nats_TourID: "7",
nats_CampaignID: "0",
nats_AdtoolID: "0",
nats_AdToolSub1ID: "0",
nats_AdToolSub2ID: "0"
additionally I"m grabbing other useful info and connecting them together 

ADDITIONAL SIGN UP INFO:
user_id: "bf7d5ac236fda36103de6a0db7cc4595b178e4b4dc17526cca3a044" +
             "f8c883a78", (encrypted user email)
    method: "email", (google setting - how accout is verified - ours is email - kept to keep sign_up recommend event status
    event_category: "registration", (it is under sign_up  but is a registration event)
    event_action: "3176", (productID they choose price point)
    event_label: "bf7d5ac236fda36103de6a0db7cc4595b178e4b4dc17526cca3" +
                 "a044f8c883a78", (I might use something other than user hash here - wanted memberID - but it is not created til after form submits)
    event_currency: " (google always wants with $)
    event_value: "15.00", ( total value of all items)

 

to hopefully give us a good picture of what is happening when someone signs up with us.

 

 

OTHER PIECES

Everything we are doing on NS/Guerila can easily be moved to any other site – all the metrics / reporting / data we get should be the same on all of them.

 

user_id

encrypted version of the user email / username – keeps us out of hot water about PII – https://support.google.com/analytics/answer/7686480?hl=en

ALSO – will be the key that connects sign ups to purchases by passing it back and forth with rocketgate.

I am putting it into

custom10 – inside NATS

also as an event_label – for the sign_up event – in analytics (in addition to user_id)

and sending it to rockegate through the sign up form – I BELEIVE we should only pass it on the url – we don’t want to connnect it to the rocketgate user – that would work against the PII goals

input type=”hidden” id=”hashedEmailInputRkt” name=”nextra[RGNATIVE][udf02]” value=””

 

still fleshing it out.

 

 

logged-in

this is standard google event – will look today and see what has to happen to recored / connect to users

 

Video start

there are a number of video events – they are mostly set up to track you-tube other standard players but have already stared with new site working on how to connect to our player.

 

 

 

 

 

so for all my user property / paramaters the following has to happen:

  1. their values have to be pushed up from the site into the data layer (probably by using javascript) and they can be seen in tag manager debug.
  2. then they have to be created as a custom dimension in GA4
  3. then they should be made as a variable in GTM
  4. Then should be added as a dimension to the google tag inside GTM and have that event value set to the variable name they represent

 

 

 

The screenshot you've provided appears to be from the Google Analytics 4 (GA4) interface showing a list of custom dimensions and metrics that you have created. To ensure these custom dimensions are captured and reported correctly in your GA4 reports, you're correct that several steps are required. Here's a summary and confirmation of the steps you mentioned:

Step 1: Push Data to the Data Layer

The first step is to push the values you want to track into the data layer from your website, likely using JavaScript. This is often done during significant events, such as a user action or page load.

For example, when a user logs in:

GA4 - Reporting

GA4 - Reporting

javascriptCopy code
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'event': 'login', // Standard event name for GA4 if applicable
  'userType': 'member', // The value you want to capture
  'logged': 'Yes', // Another value you want to capture
  // Other parameters as needed
});

Step 2: Create Custom Dimensions in GA4

GA4 - Reporting

You've already created custom dimensions in GA4, as shown in the screenshot. Each dimension has a scope and a description that helps you identify what it's for.

Step 3: Create Variables in GTM

GA4 - Reporting

GA4 - Reporting

 

 

In GTM, you create variables that correspond to the data you've pushed to the data layer. These variables are used to capture the values from the data layer and make them available for tags.

For example, you would create a data layer variable in GTM named userType that captures the userType value from the data layer.

Step 4: Add Custom Dimensions to Your GA4 Tags in GTM

Finally, you need to edit your GA4 configuration and event tags in GTM to include these custom dimensions. You map the custom dimensions you created in GA4 to the corresponding variables you set up in GTM.

For a page view or event tag in GTM, you would add the custom dimensions like this:

  • Open the tag configuration.
  • Under "Event Parameters" (for event tags) or "Fields to Set" (for configuration tags), add your custom dimensions.
  • Set the parameter name to match the custom dimension name in GA4 and set the value to the corresponding variable in GTM.

For example:

javascriptCopy code
{
  'userType': {{userType Variable}}, // Maps to the custom dimension created in GA4
  'logged': {{logged Variable}} // Maps to the custom dimension created in GA4
}

 

GA4 - Reporting

 

 

Testing and Publishing

Once you've set up everything, test your configuration in GTM's preview mode to ensure that the values are being passed to GA4 correctly. Then, once you're confident that the data is being captured as expected, publish your changes in GTM.

Scroll to Top