ServiceTitan Certified Administrator
ServiceTitan Certified Administrator


By default, when a job is booked through ScheduleEngine into ServiceTitan, that job is given a campaign called “ScheduleEngine”. This limits the attribution of those jobs, since it was likely a marketing campaign that led to the website visit that is of more interest to a marketer. 

Fortunately, there is a way that ServiceTitan Ads Measurement (DNI) users can track campaigns through ScheduleEngine so that they are correctly populated into the lead/job when it’s booked.

Step 1: Ensure ServiceTitan Dynamic Number Insertion is set up

DNI is available for all Marketing Pro Full Suite users. Instructions on how to set it up correctly can be found here in academy.

If you aren’t currently a ServiceTitan Marketing Pro Full Suite user, you can get started by visiting here.

Step 2: Have ScheduleEngine Enable ServiceTitan Tracking

ScheduleEngine does not pass attribution data into ServiceTitan by default; it is a configuration that must be turned on.

To turn it on, reach out to the ScheduleEngine team at this link and ask them to turn on ServiceTitan Campaign Tracking Attribution. 

Step 3: Append Google Ad URLs

1. Go into your Google Ads account

2. Navigate to “Tools and Settings” -> “Bulk Actions” -> “Scripts”

3. Click the “+” to create a new script and name it anything you like

4. Paste the following code into the page:


function main() {

var campaignIterator = AdWordsApp.campaigns().get();

 while (campaignIterator.hasNext()) {

 var campaign =;

 var campaignNameEncoded = encodeURIComponent(campaign.getName());


 var adGroupIterator = campaign.adGroups().get();

 while (adGroupIterator.hasNext()) {

 var adGroup =;



 var adGroupNameEncoded = encodeURIComponent(adGroup.getName());

 var newUrlSuffix = "utm_campaign=" + campaignNameEncoded + "&utm_source=google&utm_medium=cpc&utm_content=" + adGroupNameEncoded + "&utm_term={keyword}" + "&se_campaign=" + campaignNameEncoded;


 Logger.log('Changing ad group "' + adGroup.getName() + '" of campaign "' + campaign.getName() + '" URL suffix to "' + newUrlSuffix + '"');






5. Save the script

6. Click “Run” above the editor

7. A yellow box prompting you to authorize the script will pop up. Click through to Authorize it.

8. Click “Run” to run the script. If you get no errors, the script has been set up correctly.

9. Finally, set the frequency to daily (so that when new ad groups are created, they are automatically tagged).

At this point, all of your ad groups will now have their URLs add a new parameter at the end called “se_campaign”. ScheduleEngine will read this value and use it to assign their leads to the correct ServiceTitan campaign.

Step 4: Append Other Source URLs

We now need to add the se_campaign parameter to all other traffic sources. Use the builder at the link below to automatically generate URLs for your various traffic sources:


ServiceTitan URL Builder


Place the URL generated from this tool onto all of your marketing platforms and collateral. Then, when a customer visits the website through that URL, ScheduleEngine will assign that booking to the correct ServiceTitan campaign automatically.

ServiceTitan Certified Administrator
ServiceTitan Certified Administrator

Is there anyone you can point me to that is using this currently so I can see what it would look like?

Version history
Last update:
‎02-24-2023 04:56 AM
Updated by: