Google Analytics via Webhook

Find your Google Measurement ID and API Secret

To configure Google Analytics 4 via Webhook, you will need your Google Measurement ID and API Secret. Note that the Measurement ID and the API Secret should be selected from the relevant data stream.

  • Log in to Google Analytics.
  • Click on Admin.
  • Under 'Property', go to Data Streams.

googleanalyticswebhook1.png

  • Click on the Data Stream you wish to connect to ActivatePro

googleanalyticswebhook2.png

  • Copy your measurement ID. This will be needed in ActivatePro.

googleanalyticswebhook3.png

  • Scroll down to events. Click on 'Measurement Protocol API Secrets".
  • If you have not yet created an API Secret, create a new Secret.
  • Copy your API Secret. This will be needed in ActivatePro

googleanalyticswebhook4.png

Configure Google Analytics via Webhook

  • In the ActivatePro app, navigate to Settings > Integrations.
  • Click the Add new integration button in the top right corner of the page.
  • Search for 'webhook' and click Set up.

googleanalyticswebhook5.png

  • Using this information, you can now complete the setup form.
  • Method: POST
  • Destination URL:
    https://www.google-analytics.com/mp/collect?measurement_id=<yourMeasurementId>&api_secret=<yourAPISecret>
  • Authentication: No authentication
  • Content type: application/JSON

googleanalyticswebhook6.png

In the JSON text, paste the following JSON body:

{
    "client_id": "handlebar to fetch client id",
    "user_id": "handlebar to fetch user id",
    "events": [
        {
            "name": "event name",
            "params": {
                "param1": "xyz",
                "param2": "xyz"
            }
        }

]

}

googleanalyticswebhook7.png

  • Click 'Apply'.

You can now use this integration in a campaign. When using the integration in a campaign, update the campaign message with the handlebars, event name, and parameters.