• Developer Guide
  • Data Fetching Guide

Data Fetching Guide for Web

Use airbridge.client.clientId to get the browser cookie ID.

123
airbridge.fetchResource(function(res) {
    console.log(res.browser.clientID) // ex : "2bd08152-0fce-4d5e-8449-f4783b49a2c8"
})

User Agent

Use airbridge.client.ua.ua to get the browser user agent.

123
airbridge.fetchResource(function(res) {
    console.log(res.browser.userAgent) // ex : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
})

Attribution Short ID

Use airbridge.simplelink.shortId to get the "Attribution short ID". This is used for web event attribution.

123
airbridge.fetchResource(function(res) {
    console.log(res.attributionData.shortID)
})

Default Attribution Channel

Use airbridge.config.defaultChannel to get the default attribution channel. This is used as default when a "campaign short ID" does not exist.

123
airbridge.fetchResource(function(res) { 
    console.log(res.attributionData.trackingData.channel) // ex : "website"
})

Default Attribution Parameters

Use airbridge.config.defaultParams to get the default attribution channel. This is used as default when a "campaign short ID" does not exist.

123
airbridge.fetchResource(function(res) {
    console.log(res.attributionData.trackingData.params)  // ex : {medium: "posting", campaign: "blog", term: "airbridge", content: "martech-solution"}
})

Event Timestamp

Unix timestamp in milliseconds.

JavaScript
1
Date.now()  // ex : 1580887691831

Was this page helpful?

Have any questions or suggestions?