How do I automatically create trackers in Excel?

Here's a quick step by step guide on how to create Tradable Bits Trackers using Excel.

Landing Trackers are an integral part of tracking not only your clicks, but also your ROI if you have your Tradable Bits Sales Pixel setup as well. They can tell you which social ads, email campaigns, even engagement contests are leading to the most ticket sales.

 

If you like to use Excel to create UTMs or track your links, this guide will help you configure the Excel > Tradable Bits integration so you can automatically create Tradable Bits landing trackers directly in an Excel sheet. 

 

Review our Developers page with more info on setting up both Excel and Google Sheet Trackers here. 

 

Set Up Steps: 

1. Open up your Excel sheet

2. On the Home tab, click on the Add Ins button and import Script Lab

3. Create a new script snippet and copy the below code. You can also grab it directly from our developers page

/**
* Tradable Bits Tracker
* @customfunction
*/
async function createTracker(tracker_name, tracker_group_name, tracker_url, marketing_group, network, tracker_key) {
// tracker_name, tracker_group_name and tracker_url are required
// tracker_marketing_group_name, network and tracker_key are optional

if (!(tracker_name && tracker_group_name && tracker_url)) {
return null;
}
// TradableBits Public API Key goes here
var api_key = 'XXXX-XXXX-XXXXX-XXXXX';
const apiUrl = "https://tradablebits.com/api/v1/trackers";

var data = {
api_key: api_key,
tracker_name: tracker_name,
tracker_group_name: tracker_group_name,
tracker_url: tracker_url,
tracker_marketing_group_name: marketing_group,
tracker_key: tracker_key,
network: network,
virtual_domain: "tradablebits.com"
};

var formData = new FormData();
Object.entries(data).forEach(([key, value]) => {
if (value != null) {
formData.append(key, value);
}
});

try {
const res = await fetch(apiUrl, {
method: "POST",
body: formData
});

if (res.ok) {
const responseJson = await res.json();
return "https://" + responseJson.virtual_domain + "/trk/" + responseJson.tracker_key;
} else {
return await res.text();
}
} catch (error) {
return error;
}
}

 

 

4. Paste the code into your new code snippet

 

5. Replace the Xs in the script with your own Tradable Bits Public API Key

  • Retrieve your Public API Key by clicking on your account details in the top right and navigating to Security & Access > API Keys 
  • Copy your Public API Key and paste in to replace the Xs in the script

 

6. If you have a virtual domain setup on your account replace 'tradablebits .com' next to 'virtual domain' in the script with your virtual domain URL

 

7. Name the script TBITS and then click Register

 

8. Make cell G1 a checkbox

 

9. Enter the cell values of A -F as the below: 

A1 -> tracker_name -> required
B1->tracker_group_name -> required
C1->tracker_url -> required
D1->marketing_group -> optional
E1->network -> optional
F1->tracker_key -> optional

 

 

10. Enter the value in cell H1 as the below: 

=IF(G1=TRUE, SCRIPTLAB.TBITS.CREATETRACKER(A1,B1,C1,D1,E1,F1), H1)

 

11. You tracker shortened url will show up in cell H1 after G1 is checked if set up properly

 

NOTE: Script Lab stores the script locally on the browser so each user would need to import it. It is recommended to use Google Sheets if possible because the script is stored on the cloud.

Check out our other guides on Trackers here

 

Still need assistance? Please reach out to your Customer Success Team or contact support@tradablebits.com