Skip to content
  • There are no suggestions because the search field is empty.

Targeting with data provided by Triblio

Leverage Triblio Data for Advanced Audience Targeting in Convert Experiences

 THIS ARTICLE WILL HELP YOU:


Overview

Triblio is now part of Foundry, as Foundry's account-based marketing (ABM) solution. The Triblio snippet on your site returns account data for each visitor, such as company name, industry and region.

Convert can use that data to run experiences for chosen segments, such as visitors from one industry.

Triblio data may not be ready when Convert first checks the page, so the experience has to wait for it. The When a callback is called Location trigger starts the experience once the data is there. It replaces the legacy convert_recheck_experiment() token, which is being phased out. The developer docs cover the same switch in Migrate to Dynamic Location Triggers.

Before you start

  • Your project must use the current Convert tracking script. The legacy script does not support Dynamic Website Triggers. To switch, see Migrate from the Legacy Tracking Script to the New Tracking Script.
  • When a callback is called is one of the Dynamic Website Triggers. If your plan includes Dynamic Website Triggers, follow the steps below. If it doesn't, use the legacy method at the end of this article. The Convert pricing page shows what each plan includes.
  • You need the Triblio snippet for your site.

Install the Triblio snippet

Install the Triblio snippet on the pages you want to personalize. Load it before the Convert tracking code, so the Triblio data is available as early as possible.

Explore the Triblio data

To check that the snippet works and to see the data you can target, open the browser console on one of your pages and run:

Triblio.getAccountIdentification();

It returns the account data for the current visitor, for example:

city: "N/A"
country: "N/A"
domain: "N/A"
employees: "N/A"
employeesCode: "N/A"
industry: "Telecommunications"
isIsp: "N/A"
naicCode: "517311"
name: "Example Telecom Company"
region: "N/A"
revenue: "N/A"
revenueCode: "N/A"
sicCode: "J6110"
subIndustry: null

A value of N/A means Triblio has no data for that field. If the console says Triblio is not defined, the snippet is missing from the page or has not loaded yet.

The Triblio snippet provides Triblio.getAccountIdentification(). Check that it works in your console, as shown above, and ask Foundry if it doesn't.

Add the wait helper to your Project Global JS

In your project, go to Configuration > Global Javascript and add this helper. It checks every 100 ms, up to 50 times (about 5 seconds), until Triblio returns a company name or industry with a real value (not N/A or empty). If neither appears, it stops, and the experience does not run for that visitor. You only need to add it once per project.

Save it under All Environments. If one of your environments has its own Global JS, add the helper there too, because that script replaces the All Environments code on that environment.

window.waitForTriblio = ({
nextRetry = 100, // ms
maxRetries = 50,
} = {}) => {
let retries = 0;
// A field is useful when it has a real value, not "N/A", empty or null.
const known = (value) => value != null && value !== '' && value !== 'N/A';
const read = () => {
try {
const account = window.Triblio && Triblio.getAccountIdentification();
return account && (known(account.name) || known(account.industry)) ? account : undefined;
} catch (e) {
return undefined;
}
};
const check = (resolve) => {
const account = read();
if (account) {
resolve(account);
} else if (retries < maxRetries) {
retries++;
setTimeout(() => check(resolve), nextRetry);
} else {
resolve();
}
};
return new Promise((resolve) => check(resolve));
};

Set the Location trigger to wait for Triblio data

Create your experience and its changes, if you have not done so.

Edit the experience's Location settings, choose When a callback is called as the trigger, and paste this code:

if (options.isActive) return;

window.waitForTriblio().then((account) => {
if (account) {
activate();
}
});

Convert passes two arguments to the callback: activate, which you call when the experience should start, and options, which includes locationId and isActive. The isActive check stops the callback from running twice. If the Triblio data never appears, the experience does not start. For more on this trigger, see Targeting Experiments with Dynamic Location Triggers (JS Callbacks).

Create the audience

Say you want to target visitors from companies in the Telecommunications industry. Edit the experience's audience settings, select New Audience, open the Advanced tab, name the audience "Telecommunications Industry", and add a JS Condition with this code:

(function () {
var account;
try {
account = window.Triblio && Triblio.getAccountIdentification();
} catch (e) {
return false;
}
return !!account && account.industry === "Telecommunications";
})()

Replace industry === "Telecommunications" with the field and value for your segment. The callback already waits for the data, but the condition still checks that it exists, so it returns false instead of failing when Triblio has nothing for a visitor.

Choose the audience type:

  • Permanent: Convert checks the audience when it first places the visitor in the experience.
  • Transient: use this if the value can change over time and you want visitors to stop seeing the experience once they no longer match.
  • Segmentation: use this if you want to use the audience for post-test segmentation. Convert checks Segmentation audiences as soon as its code runs on a page, so a visitor joins the segment on the first page view where the Triblio data is already there.

Add the audience to the experience you want to target, and save.

Run a QA in your experience

On a page with the Triblio snippet, paste the condition into the browser console and confirm it returns true for a visitor who should see the experience. Then follow the QA guide to check that the experience runs when it should and stays off when it should not. Also test a first visit with an empty cache, when the Triblio data can take longer to arrive.

If your plan doesn't include Dynamic Website Triggers (legacy)

Without Dynamic Website Triggers, you can use the legacy convert_recheck_experiment() token in the audience condition instead. The token is being phased out. It still works today, but use the callback trigger above if your plan includes Dynamic Website Triggers.

When the condition calls the token, Convert checks the experience again every 50 ms for about 2 minutes, then stops. If the Triblio data arrives after that, the experience does not run on that page view.

  1. Install the Triblio snippet as described above. Skip the wait helper and the callback.
  2. Keep the Location trigger set to Upon Run.
  3. Add this JS Condition to the audience:
(function () {
var account;
try {
account = window.Triblio && Triblio.getAccountIdentification();
} catch (e) {
account = null;
}
var known = function (value) {
return value != null && value !== "" && value !== "N/A";
};
if (!account || !(known(account.name) || known(account.industry))) {
convert_recheck_experiment();
return false;
}
return account.industry === "Telecommunications";
})()

Keep convert_recheck_experiment(); on its own line, as shown. The condition calls it only while Triblio has not returned a company name or industry. Once it has, the condition returns true or false and the re-checks stop.

If your plan later includes Dynamic Website Triggers, move to the callback: add the wait helper, change the Location trigger to When a callback is called, replace the condition with the one in Create the audience, and run a QA before you publish the change.