How to Track the Conversion Rate of Incoming SMS via a Link Using Google Analytics
Time to read: 3 minutes
You have succeeded in sending a bulk SMS to all your customers to buy your shiny new product, via a link in an SMS. How do you check how many of your customers interacted with the link? We can do this using Google Analytics. Google Analytics is a web analytics service that tracks and report website traffic.
Technical Requirements
For this tutorial, we will only need a hosted website with a domain.
Creating a Google Analytics account
To create a Google Analytics account go to the URL here and log in with your Google account.
Obtain Tracking ID
The tracking ID is a unique set of characters in the form of UA-134276880-1
that enables tracking for your site. To obtain your unique tracking ID, fill the form as shown below. Click the “Get Tracking ID” button and then accept the terms and conditions as shown in the images below.
After clicking Accept, a tracking ID is created for your website. It will be embedded in a piece of javascript code that can be retrieved under “Tracking info”.
Making Links Trackable
Add Required Code to your Website to be Tracked
In order to get the tracking data for our website, we need to add the tracking code from the Google Analytics page to our website’s code. The code can be obtained here. Copy and paste it in your website's code, under the opening <head>
tag.
Note: This code contains your unique tracking ID, Don’t worry about the inner workings of the code.
Add Relevant Code to Make a Link to Your Website Trackable
The steps above provide tracking data for the website alone. How do you know that your users engaged the link through the SMS? This is where campaign tagging is required. Campaign tags are parameters added to URL links that allow Google Analytics to extract information associated with a particular user.
A campaign tag is in the following form:
There are five different campaign tags but our focus will be on medium and source which allows us to specify that our traffic is coming from an SMS versus standard web traffic.
A campaign tag can be manually added to a link or created using a URL builder.
How to use Google Campaign URL Builder
To use Google Campaign URL Builder, go to this link and select “Campaign URL Builder” Fill in the various text boxes for each campaign tag you wish to track like shown in the image below.
Note: The tags should be very descriptive, look at the table under the form on the same page for more information.
Filling the form automatically creates the link below like shown below, then you can just copy the link and paste it in the body of your SMS to be sent. I’d recommend that you convert the URL to a Short Link to make the link more legible.
Testing
To test, open an incognito window in your browser and enter the URL created with the campaign tags. Open the URL multiple times and in multiple browser tabs to obtain enough data to work with.
Obtain tracking Data
It takes 24-48 hrs for your campaign data to be available, but you can use the real-time analytics to track how many users are currently engaged with your campaign by navigating to the real-time reports, then click “Traffic Sources”. If your campaign medium and source is specified correctly you should see the data like the image below.
To get tracking data for your campaigns, go to “Acquisition” on the left nav bar, select “All Campaigns” under “Campaigns”. To verify that the campaign was set up correctly, type the name of the campaign into the filter. Then you’ll be able to see an overview of the campaign you tested as shown below:
Conclusion and Next Steps
Now that you have completed this tutorial you should be able to set up campaigns for other medium you wish to track your customer’s interaction with. You can set up a campaign for email marketing or even track the users that visited your about page.
You can reach me, Godwin Agedah on the following channels:
Email:agedah99@gmail.com
Twitter:@GodwinAgedah
Github:Godwin9911
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.