Skip to main content
Skip table of contents

GA4

Google Analytics 4 (formerly Firebase Analytics) is the successor of Google Universal Analytics (GA) of the Alphabet Inc. company - the parent of Google and several former Google subsidiaries. GA4 provides an analytics service for website traffic data that supports data streams from clients and server side via the measurement protocol version 2.

Official website: GA4

JENTIS - GA4 - Global Constants

Measurement IDYour GA4 Property Measurement ID, which is the identifier for a data stream in GA4 terms. You'll find it in the Google Analytics UI in: Admin > Data Streams > choose your stream > Measurement ID.
API Secret

Required for Measurement Protocol based data streams only. This is an API Secret key that is generated through the Google Analytics UI. To create a new secret, navigate in the Google Analytics UI to: Admin > Data Streams > choose your stream > Measurement Protocol > Create. We recommend that you keep these private to your organization.

Debug ModeActivate to monitor the event in GA4 DebugView. Please make sure to not publish a JTM Container version with this activated, as all productive traffic will be interpreted for DebugView and not processed in your reports.

JENTIS - GA4 Tag Types

Currently JENTIS Tag Manager supports the following tags with GA4.

S2S (Twin-Server): Pageview

DescriptionJENTIS Data Layer - Default Dependencies

This tag is equivalent to the automatically collected "page view" from client side executed gtag.js - but as a stand alone server side component! So no client side executed third party library is involved. It will also handle all session related properties (engagement, session duration and expiration, etc). It is strongly recommended to use this tag in all server side GA4 configurations with JENTIS.



This tag will create the following data storages (cookies, local or session client side browser storages):

  • no data is explicitly stored or read on a users device (client side) specifically with this tag

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • submit

Code example (do not execute or copy paste; for reference only).

function pageview() {
    _jts.push({
       "track" : "pageview"
    });

    _jts.push({
        "track" : "submit"
    });
}

S2S (Twin-Server): Custom Event

DescriptionJENTIS Data Layer - Default Dependencies

Use this tag to further customize your GA4 configuration with JENTIS. By implementing custom events with GA4 next to the default events (https://support.google.com/analytics/answer/9267735?hl=en). However you are not limited to also use the same default events as the event value.


This tag will create the following data storages (cookies, local or session client side browser storages):

  • no data is explicitly stored or read on a users device (client side) specifically with this tag

There are no default dependencies defined for this tag that are required with the JENTIS data layer. Please use a custom trigger and state or default triggers from JENTIS that match your requirements.

C2S: GA4 - Global Site Tag

DescriptionJENTIS Data Layer - Default Dependencies

This tag will initialize GA4 on a users device (client side) by loading gtag.js source from a third party location. With this tag configured in your JENTIS implementation you will activate all GA4 features that are configurable in the GA4 user interface for a data stream (ie. automatically tracking page views, scrolls and other events).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • submit 

Code example (do not execute or copy paste; for reference only).

function pageview() {
    _jts.push({
       "track" : "pageview"
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - View Item

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'view_item' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • product 1-n
  • productview
  • submit 

Code example (do not execute or copy paste; for reference only).

function productview() {
    _jts.push({
        "track" : "pageview"
    });

    //---------------------------
    
    _jts.push({
        "track"     :   "product",
        "type"      :   "productview",
        "id"        :   "1111111",
        "quantity"  :   1,
        "name"      :   "Product 1",
        "brutto"    :   100.00,
        "brand"     :   "Brand Y",
        "group"     :   ["group1","group2"],
        "position"  :   1,
        "variant"   :   "type a"
    });

    _jts.push({
        "track"     :   "product",
        "type"      :   "productview",
        "id"        :   "2222222",
        "quantity"  :   1,
        "name"      :   "Product 2",
        "brutto"    :   200.00,
        "brand"     :   "Brand X",
        "group"     :   ["group1","group2"],
        "position"  :   1,
        "variant"   :   "type b"
    });

    //---------------------------
    
    _jts.push({
        "track" : "productview"
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - Add To Cart

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'add_to_cart' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • product
  • addtocart
  • submit 

Code example (do not execute or copy paste; for reference only).

function addtocart() {

    _jts.push({
        "track"     :   "product",
        "type"      :   "addtocart",
        "id"        :   "1111111",
        "quantity"  :   2,
        "name"      :   "Product 1",
        "brutto"    :   100.00,
        "group"     :   ["group1","group2"],
        "brand"     :   "Brand X",
        "position"  :   1,
        "variant"   :   "type a"
    });

    //---------------------------
    
    _jts.push({
        "track" : "addtocart"
    }, true);  
    //true parameter -> 
    //In this case it is identical with _jts.push({"track":"submit"})
}


C2S: GA4 - Purchase

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'purchase' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • product 1-n
  • order
  • submit 

Code example (do not execute or copy paste; for reference only).

function checkout() {
    _jts.push({
        "track" : "pageview"
    });
   
    //---------------------------

    _jts.push({
        "track"     :   "product",
        "type"      :   "order",
        "id"        :   "1111111",
        "name"      :   "Product 1",
        "group"     :   ["group1","group2"],
        "brutto"    :   100.00,
        "netto"     :   70.10,
        "variant"   : "type a",
        "brand"     :   "Brand X",
        "quantity"  :   3,
        "position"  :   1
    });

    _jts.push({
        "track"     :   "product",
        "type"      :   "order",
        "id"        :   "2222222",
        "name"      :   "Product 2",
        "group"     :   ["group1","group2"],
        "brutto"    :   150.00,
        "netto"     :   110.10,
        "variant"   :   "type b",
        "brand"     :   "Brand X",
        "quantity"  :   1,
        "position"  :   2
    });

    //---------------------------

    _jts.push({
        "track"     :   "order",
        "orderid"   :   "abcdef123456",
        "brutto"    :   450.00,
        "shipping"  :   20.00,
        "tax"       :   40.00,
        "affiliation":  "JENTIS",        
        "vouchers"  :   [
            {
                "code":     "abc123",
                "value":    10.15
            },
            {
                "code":     "def456",
                "value":    15.80
            }            
        ]
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - View Cart

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'view_cart' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • product 1-n
  • cartview
  • submit 

Code example (do not execute or copy paste; for reference only).

function checkout() {
    _jts.push({
        "track" : "pageview"
    });
   
    //---------------------------

    _jts.push({
        "track"     :   "product",
        "type"      :   "cartview",
        "id"        :   "1111111",
        "name"      :   "Product 1",
        "group"     :   ["group1","group2"],
        "brutto"    :   100.00,
        "netto"     :   70.10,
        "variant"   : "type a",
        "brand"     :   "Brand X",
        "quantity"  :   3,
        "position"  :   1
    });

    _jts.push({
        "track"     :   "product",
        "type"      :   "cartview",
        "id"        :   "2222222",
        "name"      :   "Product 2",
        "group"     :   ["group1","group2"],
        "brutto"    :   150.00,
        "netto"     :   110.10,
        "variant"   :   "type b",
        "brand"     :   "Brand X",
        "quantity"  :   1,
        "position"  :   2
    });

    //---------------------------

    _jts.push({
        "track"     :   "cartview",
        "brutto"    :   450.00,
        "netto"     :   380.00
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - Select Item

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'select_item' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • product
  • productlistclick
  • submit 

Code example (do not execute or copy paste; for reference only).

function productlistclick() {

    _jts.push({
        "track"     :   "product",
        "type"      :   "productlistclick",
        "id"        :   "1111111",
        "quantity"  :   1,
        "name"      :   "Product 1",
        "brutto"    :   100.00,
        "brand"     :   "Brand X",
        "group"     :   ["group1","group2"],
        "position"  :   1,
        "variant"   :   "type a"
    });

    //---------------------------
    
    _jts.push({
        "track" : "productlistclick",
        "name"  : "PRODUCTLIST NAME"
    }, true);  
    //true parameter -> 
    //In this case it is identical with _jts.push({"track":"submit"})
}


C2S: GA4 - Add To Wishlist

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'add_to_wishlist' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • product
  • addtowishlist
  • submit 

Code example (do not execute or copy paste; for reference only).

function addtocart() {

    _jts.push({
        "track"     :   "product",
        "type"      :   "addtowishlist",
        "id"        :   "1111111",
        "quantity"  :   2,
        "name"      :   "Product 1",
        "brutto"    :   100.00,
        "group"     :   ["group1","group2"],
        "brand"     :   "Brand X",
        "position"  :   1,
        "variant"   :   "type a"
    });

    //---------------------------
    
    _jts.push({
        "track" : "addtowishlist"
    }, true);  
    //true parameter -> 
    //In this case it is identical with _jts.push({"track":"submit"})
}


C2S: GA4 - Begin Checkout

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'begin_checkout' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • product 1-n
  • checkout
  • submit 

Code example (do not execute or copy paste; for reference only).

function checkout() {
    _jts.push({
        "track" : "pageview"
    });
   
    //---------------------------

    _jts.push({
        "track"     :   "product",
        "type"      :   "checkout",
        "id"        :   "1111111",
        "name"      :   "Product 1",
        "group"     :   ["group1","group2"],
        "brutto"    :   100.00,
        "netto"     :   70.10,
        "variant"   : "type a",
        "brand"     :   "Brand X",
        "quantity"  :   3,
        "position"  :   1
    });

    _jts.push({
        "track"     :   "product",
        "type"      :   "checkout",
        "id"        :   "2222222",
        "name"      :   "Product 2",
        "group"     :   ["group1","group2"],
        "brutto"    :   150.00,
        "netto"     :   110.10,
        "variant"   :   "type b",
        "brand"     :   "Brand X",
        "quantity"  :   1,
        "position"  :   2
    });

    //---------------------------

    _jts.push({
        "track"     :   "checkout",
        "step"      :   1,
        "brutto"    :   450.00,
        "paytype"   :   "creditcard"
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - View Item List

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'view_item_list' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • pageview
  • product 1-n
  • productlist
  • submit 

Code example (do not execute or copy paste; for reference only).

function productlist() {
    _jts.push({
        "track" : "pageview"
    });

    //---------------------------
    
    _jts.push({
        "track"     :   "product",
        "type"      :   "productlist",
        "id"        :   "1111111",
        "quantity"  :   1,
        "name"      :   "Product 1",
        "brutto"    :   100.00,
        "brand"     :   "Brand X",
        "group"     :   ["group1","group2"],
        "position"  :   1,
        "variant"   :   "type a"
    });

    _jts.push({
        "track"     :   "product",
        "type"      :   "productlist",
        "id"        :   "2222222",
        "quantity"  :   1,
        "name"      :   "Product 2",
        "brutto"    :   200.00,
        "brand"     :   "Brand Y",
        "group"     :   ["group1","group2"],
        "position"  :   1,
        "variant"   :   "type b"
    });

    //---------------------------
    
    _jts.push({
        "track" : "productlist",
        "name"  : "PRODUCTLIST NAME"
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - View Promotion

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'view_promotion' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box:

_jts.push track:

  • promotion 1-n
  • promotionimpression
  • submit 

Code example (do not execute or copy paste; for reference only).

function promotionimpression() {
  
  _jts.push({
      "track"     : "promotion",
      "type"      : "promotionimpression"
      "id"        : "1234",
      "name"      : "Promotion A",
      "position"  : "1",
      "creative"  : ""
  });
  
  _jts.push({
      "track"     : "promotion",
      "type"      : "promotionimpression"
      "id"        : "5678",
      "name"      : "Promotion B",
      "position"  : "2",
      "creative"  : ""
  });
  
  _jts.push({
      "track" : "promotionimpression"
  }, true);  
    //true parameter -> 
    //In this case it is identical with _jts.push({"track":"submit"})
}


C2S: GA4 - Add Payment Info

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'add_payment_info' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box.

_jts.push track:

  • checkoutoption
  • submit 

Code example (do not execute or copy paste; for reference only).

function checkoutoption(){
    _jts.push({
        "track" :   "checkoutoption",
        "key"   : "paymentmethod",
        "value" : "<<NAME OF THE PAYMENT-METHOD>>"
    }, true);  
    //true parameter -> 
    //In this case it is identical with _jts.push({"track":"submit"})
}


C2S: GA4 - Remove From Cart

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'remove_from_cart' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box.

_jts.push track:

  • product
  • removefromcart
  • submit 

Code example (do not execute or copy paste; for reference only).

function removefromcart() {

    _jts.push({
        "track"     :   "product",
        "type"      :   "removefromcart",
        "id"        :   "1111111",
        "quantity"  :   2,
        "name"      :   "Product 1",
        "brutto"    :   100.00,
        "group"     :   ["group1","group2"],
        "brand"     :   "Brand X",
        "position"  :   1,
        "variant"   :   "type a"
    });

    //---------------------------
    
    _jts.push({
        "track" : "removefromcart"
    }, true);  
    //true parameter -> 
    //In this case it is identical with _jts.push({"track":"submit"})
    
}


C2S: GA4 - Add Shipping Info

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'add_shipping_info' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box.

_jts.push track:

  • pageview
  • product 1-n
  • checkout
    • step 3
  • submit 

Code example (do not execute or copy paste; for reference only).

function checkout() {
    _jts.push({
        "track" : "pageview"
    });
   
    //---------------------------

    _jts.push({
        "track"     :   "product",
        "type"      :   "checkout",
        "id"        :   "1111111",
        "name"      :   "Product 1",
        "group"     :   ["group1","group2"],
        "brutto"    :   100.00,
        "netto"     :   70.10,
        "variant"   : "type a",
        "brand"     :   "Brand X",
        "quantity"  :   3,
        "position"  :   1
    });

    _jts.push({
        "track"     :   "product",
        "type"      :   "checkout",
        "id"        :   "2222222",
        "name"      :   "Product 2",
        "group"     :   ["group1","group2"],
        "brutto"    :   150.00,
        "netto"     :   110.10,
        "variant"   :   "type b",
        "brand"     :   "Brand X",
        "quantity"  :   1,
        "position"  :   2
    });

    //---------------------------

    _jts.push({
        "track"     :   "checkout",
        "step"      :   3,
        "brutto"    :   450.00,
        "paytype"   :   "creditcard"
    });

    _jts.push({
        "track" : "submit"
    });
}


C2S: GA4 - Generate Lead

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a 'generate_lead' event with GA4 client side. A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

There are no default dependencies defined for this tag that are required with the JENTIS data layer. Please use a custom trigger and state or default triggers from JENTIS that match your requirements.


C2S: GA4 - Custom Event

DescriptionJENTIS Data Layer - Default Dependencies

This tag will track a custom event with an event name to be defined by you (executed client side). A configuration must be activated prior to this event (GA4 - Global Site Tag).

This tag will create the following data storages (cookies, local or session client side browser storages):

  • gtag.js library internal cookies can be set (this tag executes original source code from the third party, which gives this third party permission to access and store data on the users device)

The following JENTIS Data Layer _jts push track calls are required for the default JENTIS GA4 implementation to work out of the box.

_jts.push track:

  • event 

Code example (do not execute or copy paste; for reference only).

function ga_event() {
    _jts.push({
      "track" : "event",
      "group" : "GROUP",
      "category" : "CATEGORY",
      "label" : "LABEL",
      "numvalue" : 123,
      "name" : "NAME",
      "value" : "VALUE"
    });
}



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.