Call Tracking Enhances Response Reliability

Setting Up DNI Integrations with Google Analytics 4

  1. Home
  2. Knowledge Base
  3. CallView360® Call Tracking
  4. Using Dynamic Number Insertion (DNI)
  5. Setting Up DNI Integrations with Google Analytics 4
  1. Home
  2. Knowledge Base
  3. Data Integrations
  4. Setting Up Your Google Integrations
  5. Setting Up DNI Integrations with Google Analytics 4

This article helps you understand how Dial800 DNI (Dynamic Number Insertion) integrations work within the new Google Analytics 4 platform.

Integrate Dial800 DNI with Google Analytics 4

The switch to GA4 requires an update to the script of Dial800’s real-time event, a new Google API secret, and a new Google Measurement ID. Follow the steps below to set up your Dial800 DNI integration in GA4:

  1. Collect Your Data Stream Measurement ID
  2. Add a New API Secret To Your Google Analytics 4 Account
  3. Update Your Real-Time Event Integration Script
  4. Make Test Calls to Confirm Your New Events
  5. Mark the Event as a Conversion
  6. Import the New Event Into Google Ads

Collect Your Data Stream Measurement ID

Please Note: Before beginning this step, you must already have a data stream from your website set up in Google Analytics 4. This data stream is how Google can analyze your website traffic.

    1. To find your Measurement ID, log into Google Analytics
    2. Click on Admin > Data Streams > Select Your Data Stream; your Measurement ID is displayed on the top-right of the screen

Dial800-DNI-Updates_Data Measurement ID

  1. Click the Copy icon to copy your API secret value, and paste it into a location you can get it from again later

Add a New API Secret To Your Google Analytics 4 Account

    1. While logged into Google Analytics 4, click on Admin > Data Streams, and expand your Data Stream menu to show the extended options
    2. Click on Measurement Protocol API Secrets

Dial800-DNI-Updates_API Secret

    1. Click Create to generate a new API secret

Dial800-DNI-Updates_Generate Secret

    1. Give your new Measurement Protocol API secret a nickname

Dial800-DNI-Updates_Name Secret

    1. Once your new API secret is listed, click the Copy icon to copy the secret value and paste it into a location you can get it from again later

Dial800-DNI-Updates_Copy Secret

Update Your Real-Time Event Integration Script

First, copy and paste the below updated Google integration script to replace the existing script located in the Google Analytics Real-Time event in your Dial800 account. This new script is added during step 3.5 Custom in the Real Time Event Open API interface.

New Real-Time Event script to copy and paste:


{
    "client_id":"Dial800",
    "user_id":"%{uniquecallerid}",
    "non_personalized_ads":false,
    "events":
    [
        {
        "name":"Dial800_Call",
        "params":
            {
                "ea":"%{campaign}",
                "cid":"%{uniquecallerid}",
                "cm":"%{referrertype}",
                "cs":"%{referrerhost}",
                "cn":"%{campaign_dnis_tag}",
                "ck":"%{keywords}",
                "gclid":"%{ppc_click_id}",
                "ani":"%{ani}",
                "dnis":"%{dnis}"
            }
        }
    ]
}

Second, update the post URL in step 4 (Destination) of the Real-Time Event interface.
Dial800-DNI-Updates_Post URL

Update the post URL to the following:
https://www.google-analytics.com/mp/collect?api_secret=YOURSECRETHERE&measurement_id=G-YOURMEASURMENTID

  1. Replace “YOURSECRETHERE” with your API secret value from above
  2. Replace “YOURMEASUREMENTID” with your Measurement ID value from above

Click Finish once you have updated both the script and URL in the Real-Time Event to save your changes.

Make Test Calls to Confirm Your New Events

Once you have made these updates to your DNI script, it is important that you test the DNI numbers on your website to ensure the new events are pulling into Google Analytics 4 correctly.

Head to your website where you have the DNI script installed, and call the dynamic toll free number displayed on the page. You can then log into Dial800 and check your call activity to confirm the inbound call was tracked and labeled for your DNI campaign. In 24 to 48 hours, you can then check in GA4 to see that your new event has appeared.

Mark the Event as a Conversion

Once your new event is set and tested, you will need to set it as a Conversion Action.

    1. Click on Admin > Events to view your list of Events
    2. Your new event should now be listed with the other events – toggle the “Mark as Conversion Action” on to successfully mark the event as a conversion

Dial800-DNI-Updates_Conversion

Import the New Event Into Google Ads

The final step is importing your conversion goal from Google Analytics into Google ads to track the call conversions against the campaigns. There are no changes to this step with the update to Google Analytics 4.

If you have any more questions or need help with setting up your Google Analytics 4 integration, you can contact Dial800 Customer Care or call 1-800-DIAL800.

Was this article helpful?

Related Articles