AI in Conversion Tracking - 3 Practical Examples
AI has changed everything. How does it affect conversion tracking and analytics?
A few examples of how I’m using AI with my most advanced conversion tracking systems.
(Extra update Jan 6 – a few days after publishing)
A few days after hitting publish, I had a thought. Could I use AI to develop a small app to solve the dreaded Meta CAPI events? With Meta Pixel events, CAPI, event deduplication, everything.
Turns out the answer is yes.
In the video below, you get a nice demo of what it means to use AI in 2025, to do conversion tracking.
Soon you won’t need to hire me anymore. And I’ll have to sleep under a bridge 🏚️💸
Until then, look 👇 at an example of how I use AI to get your business analytics data on a level that until now has only been available for the huge billion-dollar mega-corporations.
Intro
Why is conversiontracking.io better than the competition?
A popular competitor of conversiontracking.io requires a JavaScript file which is 11972 lines of code. The app was made before AI came along.
It’s goal is to assess the traffic channel (Organic Search, Paid Search, Orcanig Social, Video etc) of the website visitor. The app uses old school if-else logic.
But it fails. An example problem is that Facebook ads (unlike Google Ads) has a “Facebook Click ID” or fbclid, in all link clicks – including organic non-paid clicks.
My competition thinks any click with fbclid is paid Meta ads. But it’s not wrong! Wrong attribution.
My setups ask AI to make an assessment based on all the data and get a more reliable result, which keeps improving over time.
Extra benefit: you don’t need a 309 KB JavaScript file slowing down your website as my setup works in the server-side.
Bragging aside, let’s dig in.
I focus a lot on iFrame conversion tracking, mostly Acuity Scheduling conversion tracking. There are a few situations where AI has proven to be really helpful, in automating small tedious parts of conversion tracking which are not easy to automate with the old-school “if-else” logic, regex. But are a breeze for OpenAI’s ChatGPT API to handle.
Examples of using AI for conversion tracking
1) Acuity Scheduling Conversion Tracking - Phone Number Formats
Acuity Scheduling outputs phone numbers in all sorts of format
+15414192234 full international or the E.164 format
17135028023 country code but without +
5418481716 local without + or 1, no country codes
Because conversion tracking is done using more and more of first-party data like emails, phone numbers etc. and matching logged-in users, like Google Ads Enhanced Conversion Tracking, Meta Pixel “Advanced Matching” and Meta Conversions API (CAPI), we gotta make sure our data is in the correct format.
A super annoying quirk with Meta CAPI and Google Ads API is that both want phone numbers in a different format. Google Ads API for conversion tracking expects the E.164 format, while Meta CAPI wants the country code but without the “+”
So. If we have multiple formats we need, an unknown format we get from Acuity, combined with 240 potential international country codes, and the possibility of Acuity Scheduling customers to use an international number…things get really complex really fast.
For a solution that’s super fast, reliable and works for my international clients in different countries, I just use Open AI API and ask it to combine our phone number, with the time zone of the customer and the business to do all of this for us.
GOAL:
Turn phone number "{{acuity.phone}}" to E.164 format
INSTRUCTIONS:
Output the number prefixed by "+" only. No reasoning.
Phone number "{{acuity.phone}}" can be any format:
A) including "+" and country code,
B) including country code but no "+"
C) or plain local version without + and without country code.
If phone number "{{6.phone}}" does not have a country code, you must pick most likely county code based on customer time zone and business time zones. e.g:
America/New_York is +1
Europe/Helsinki is +358
etc.
DATA:
Customer Phone (unknown format): "{{acuity.phone}}"
Customer Time Zone: "{{acuity.timezone}}"
Business Time Zone: "{{acuity.calendarTimezone}}"
I’m not yet sure if a more succinct prompt would work as well or better, but with automation, I like to play it safe.
So now we have a very high likelihood of getting our E.164 formatted phone number, as AI can detect a correct format, add the missing parts…of if needed come up with the missing country code based on the country (by time zone, which Acuity unlike Typeform and others as a scheduling app has!)
From E.164 it’s easy to strip the + for Meta Conversion API.
2) Acuity Scheduling multi-email update
Acuity made an update where it allows multiple emails to be added in the scheduler. This will break simple Acuity Enhanced conversion tracking & Advanced Matching setups that just pass the email to Google Ads or Meta.
A quick solution for Google Tag Manager in the client side is to pick the first email from list of Acuity conversion emails
// Get first email from possible comma-separated list
var firstEmail = data.Email.split(',')[0].trim();
acuityDebugLog('Using first email from list', firstEmail);
👆 If you try Enhanced Conversion tracking or Meta Pixel Advanced Matching with the first email of the screenshot above - invoices-556@gmail.com, our conversion tracking is gonna suck pretty bad.
What I’ve seen for my Acuity Scheduling clients, is that often bookings may not have the best email as the first one.
For my Acuity clients e.g. in the baby ultrasound niche, often there may be others attending and the emails are random. An Acuity customer does not think “Oh I gotta make sure to use my best email which I also use to log in to Youtube and Instagram, as the first email in my Acuity booking”.
So, we again turn to AI and ask ChatGPT API to evaluate our list of email addresses Acuity provides, combined with the first and last name in our Acuity booking to assess what’s the most likely email we should pass on to Google Ads and Meta / Facebook conversions.
- You must pick and output the correct email address. Nothing else.
emails = [{{acuityscheduling.email}}]
Name = "{{acuityscheduling.firstName}} {{acuityscheduling.lastName}}"
Q: Which email address is most likely to be used by " {{acuityscheduling.firstName}} {{acuityscheduling.lastName}}", to log into Youtube, Facebook, Instagram and other social media?
emails[] can contain 1 or multiple addresses.
I have clients who must track over 200,000 Acuity Scheduling appointments every year. The tracking must be as accurate as we can theoretically make it, with all possible data points sent to Meta CAPI, Google Ads and others. It must be fast, and automatic but require not manual effort from us humans.
3) Website Traffic channels
A human (or an AI!) can easily understand which traffic channel each combo is. But if-else JavaScript will not.
For my custom iFrame conversion tracking setups, we use a system that remembers where each website visitor came from – including the previous website (called ‘referrer’), Google Ads or Meta Ads Click ID’s, UTM parameters, first landing page and more.
I like to pass these into hidden fields of our iFrames for offline conversion tracking, and for an automatic “where did you hear about us” as well as to generate automatic monthly Google Sheet reports of each conversion and where they came from to understand how your business is doing and what marketing strategies work and which suck.
The challenge is, that assessing the traffic source, like Google Analytics 4 does, is hard.
For example, if we have a Google Ads click ID, it’s some sort of a paid campaign. But, it could be an ad in an iPhone app or a paid search on google.com. Ok, so we could make a logic that if the referrer contains “google.” and if we have a Google Ads click ID, our traffic channel is “Paid Search”.
Great!
But what if the referrer is not available? Sometimes this happens. Maybe we still have some UTM parameter. But clients use different ones. Some use
utm_medium=cpc - “cost per click”
utm_medium=ppc - “pay per click”
utm_medium=paid
utm_medium=display
utm_medium=performance_max
utm_medium=retargeting
To add more complexity, we must remember that Google My Business links (which are essentially organic search) have google as a referrer, have UTM parameters but are not paid search! The combinations are endless.
Maybe we forgot the UTM medium, but we have a Google Ads tracking template that adds the search term (what they wrote and searched in google.com) into our ads, like
example.com?utm_term=puppy+yoga+near+me
Thats clearly a paid search! Even if your visitor uses a super private browser like Brave, which strips out the Google Ads Click ID’s from from the URL, an AI could see the search term and know traffic channel is “Paid Search” just based on that.
No wonder my competitors try using 11000 lines of code to solve it and fail. I use less than 20, just prompt AI what to do.
Next
I’m very curious about AI being able to provide automatic monthly reports based on conversion tracking data. I have tested few tools but so far I have not found anything I’d recommend to my clients. But it’s probably only a matter of time.
At the moment, I love using AI to handle these tiny daily tasks with conversion tracking setups, where if-else logic fails, but are way to boring for humans to do. Imagine going through each of your conversions manually and choosing the best email address to send to Google.