Advanced GTM

This method of integration is required if your Google Analytics integration is already sending data to a server container. It works by creating a new Google Analytics 4 configuration that is a copy of your original GA4 configuration and will only send data to the SegmentStream server.

SegmentStream admin panel setup

  1. Inside the admin panel navigate to Settings > Events Tracking.
  1. Open the Advanced Settings menu and disable the Forward events to Google Analytics 4 option.
  1. Click on the field containing the Server Container URL to copy its value to your clipboard and click SAVE.
Image without caption

Create new data stream in your Google Analytics 4

  1. Sign in to your Google Analytics account and navigate to the Admin section.
  1. Select the account and property where your current data stream is located.
  1. Under the Property column, click on Data Streams.
    1. Image without caption
  1. Click on the Add Stream button and select Web.
    1. Image without caption
  1. You should see a notice, click yes.
    1. Image without caption
  1. Enter your website's URL and name the stream SegmentStream GA4 Streaming.
    1. Image without caption
  1. Click Create stream.
  1. Any custom events and event modifications specified in the settings of the current data stream need to be duplicated in the newly created SegmentStream GA4 Streaming stream.
    1. Image without caption
  1. Make note of the Measurement ID of your new data stream.
    1. Image without caption

Configure tags in your GTM

  1. Go to the Tags section in the Google Tag Manager container.
  1. Open your Google Analytics: GA4 Configuration tag and copy it.
    1. Image without caption
  1. Rename the copied tag to GA4 Streaming Configuration.
  1. Set the Measurement ID field to the value from the newly created SegmentStream GA4 Streaming data stream.
  1. Select the Send to server container option.
  1. Paste the value of the Server Container URL field found in your SegmentStream project into the Server Container URL field, and click Save.
    1. Image without caption
  1. Copy all the Google Analytics: GA4 Event type tags.
    1. Image without caption
  1. Rename the copied event tags using the format GA4 Streaming - {event name}.
  1. Set the Configuration Tag option of all copied event tags to GA4 Streaming Configuration.
    1. Image without caption

Test and publish your GTM container

  1. Use the GTM Preview functionality to test if the setup is correct before publishing the changes.
    1. Image without caption
  1. If the Preview container is successfully connected to your website you should see a notification.
    1. Image without caption
  1. Next, click through a couple of pages on your website to make sure events are being sent to SegmentStream.
  1. Then, open your Google Analytics settings page in the SegmentStream admin panel.
    1. Image without caption
  1. If the message is highlighted in red, try clicking on the refresh button.
  1. If the message persists, it means that data hasn't been collected yet. You should make sure you followed the guide correctly or contact our support team.
  1. If you see a message highlighted with green, informing you that data has been collected, you can Publish the GTM container.