logo

Basic Google Tag (gtag.js)

This method of integration requires the least time to implement, it works by editing the Google Tag configuration to send data to the SegmentStream server which then forwards the data to your Google Analytics 4 property.

SegmentStream admin panel setup

  1. Inside the admin panel navigate to Settings > Google Analytics.
  1. Click on the field containing the Server Container URL to copy its value to your clipboard and click SAVE.
Image without caption

Update your Google Tag implementation

  1. In your website code, locate the implementation of the Google Analytics 4 tag.
  1. After finding the line with your current tag, edit it so that it has a transport_url parameter that contains the value of the the Server Container URL field found in your SegmentStream project.
  1. See an example of the code below:
    1. javascript
      gtag('config', 'YOUR-MEASUREMENT-ID', { 'transport_url': 'SERVER CONTAINER URL', });
  1. Deploy the code to your production server.