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:
- Collect Your Data Stream Measurement ID
- Add a New API Secret To Your Google Analytics 4 Account
- Update Your Real-Time Event Integration Script
- Create Custom Dimensions in GA4 to Collect Your Dial800 Data
- Make Test Calls to Confirm Your New Events
- Mark the Event as a Conversion
- 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.
-
- To find your Measurement ID, log into Google Analytics
- Click on Admin > Data Streams > Select Your Data Stream; your Measurement ID is displayed on the top-right of the screen
- 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
-
- While logged into Google Analytics 4, click on Admin > Data Streams, and expand your Data Stream menu to show the extended options
- Click on Measurement Protocol API Secrets
-
- Click Create to generate a new API secret
-
- Give your new Measurement Protocol API secret a nickname
-
- 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
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.
Update the post URL to the following:
https://www.google-analytics.com/mp/collect?api_secret=YOURSECRETHERE&measurement_id=G-YOURMEASURMENTID
- Replace “YOURSECRETHERE” with your API secret value from above
- 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.
Create Your New Custom Dimensions in GA4 to Collect Your Dial800 Data
- Log into your Google Analytics account.
- Click on the Admin gear in the bottom of the left-hand menu.
- In the Data Display section, click on Custom Definitions. This will bring up a list of your custom definitions. Click the Create Custom Dimension button to add a new dimension.
- This will open a new window where you can enter the new custom dimension details. Copy and paste the data from the table in this article to create the new Dial800 custom dimensions you need:
- Copy the name from the Dimension Name column into the Dimension Name field in GA4.
- Set your new custom dimension as an Event in the Scope dropdown menu in GA4.
- Copy the description from the Description column into the Description field in GA4.
- Copy the ID from the Parameter ID column into the Event Parameter field in GA4.
- When you are done entering the new custom dimension information, click Save.
For more about creating custom dimensions, please visit the article Creating Custom Dimensions in Google Analytics 4.
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.
-
- Click on Admin > Events to view your list of Events
- 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
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.