eduengage AdConnect is a data integration utility developed to systematically centralize digital advertising data within CRM. It establishes a data pipeline from major advertising platforms, including Meta Ads, Google Ads, LinkedIn Ads, and TikTok Ads, into an organization's CRM. The utility performs three primary functions: first, it captures and transmits lead data generated through platform-native advertising forms directly to the CRM, ensuring timely and accurate data entry. Second, it systematically collects and syncs daily campaign performance metrics, such as ad spend, impressions, and clicks, associating this data with the corresponding campaign records within the CRM. Third, it captures a detailed set of attribution parameters of user interactions originating from web properties from URL queries, including first and last-touch UTM data and platform-specific click identifiers, which are then appended to the relevant records.
To enable outcome-based analysis, AdConnect facilitates the transmission of conversion events from the CRM back to the advertising platforms, utilizing established server-to-server protocols such as the Meta Conversions API (CAPI), the LinkedIn Conversion API, and Google Ads Offline Conversions. The primary outcome of this centralized data model is the creation of a unified dataset that allows organizations to conduct longitudinal analysis of their digital outreach campaigns, enhance data integrity by reducing manual reporting, and build a structured foundation for evaluating the efficacy of various channels and strategies based on empirical data.
The eduengage AdConnect outlines how to create campaigns synced between Salesforce and ad platforms (Meta Ads and Google Ads). Campaigns can be created in either platform. AdConnect integrates multiple ad accounts, syncing performance data to Salesforce daily. It lists supported fields for campaign insights and lead tracking.
Notes that event submissions to Meta and Google Ads require manual implementation using Salesforce flows.
There are two methods to create campaigns in Salesforce that are synced with the Ad Platform:
Ad Platform Initiated:
Create campaigns directly within the Ad Platform, and AdConnect will automatically replicate them in Salesforce.
Salesforce Initiated:
Create campaigns in Salesforce, retrieve the corresponding campaign ID from the Ad Platform, and then add this ID as the External ID in the Salesforce campaign.
Meta Ads:
To connect a Meta Ad account, share the ad account and pixel with business manager ID 1905445606505024 via partner sharing.
Google Ads:
To connect a Google Ads account, provide your Google Ads ID. A manager access request will be sent to your account for your approval.
LinkedIn Ads
Tiktok Ads
Use the shared sheet to build URLs with Query Parameters and Macros for each platform, or use ready URL templates from the URLs sheet.
Important Notes:
To record values from the URL and pass it to Account Engagement:
eduengage).<script>
(function () {
const COOKIE_NAME = 'eduengage_AdConnect';
const COOKIE_EXPIRE_DAYS = 365;
const FIRST_UTM_KEYS = [
'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'
];
const LAST_KEYS = [
'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term',
'gclid', 'fbclid', 'ttclid', 'msclkid', 'li_fat_id',
'campaign_id', 'campaign_name', 'ad_group_id', 'ad_group_name',
'ad_id', 'ad_name', 'creative_id', 'creative_name',
'keyword', 'matchtype', 'network', 'device', 'device_model',
'extension', 'free_item_id', 'placement', 'target',
'interest_location', 'location', 'site_source_name'
];
const FIELD_MAPPINGS = {
// First UTMs
first_utm_source: 'eduengage_first_utm_source',
first_utm_medium: 'eduengage_first_utm_medium',
first_utm_campaign: 'eduengage_first_utm_campaign',
first_utm_content: 'eduengage_first_utm_content',
first_utm_term: 'eduengage_first_utm_term',
// Last UTMs
last_utm_source: 'eduengage_last_utm_source',
last_utm_medium: 'eduengage_last_utm_medium',
last_utm_campaign: 'eduengage_last_utm_campaign',
last_utm_content: 'eduengage_last_utm_content',
last_utm_term: 'eduengage_last_utm_term',
// Click IDs
gclid: 'gclid',
fbclid: 'fbclid',
ttclid: 'ttclid',
msclkid: 'msclkid',
li_fat_id: 'li_fat_id',
// Ad data
last_campaign_id: 'eduengage_campaign_id',
last_campaign_name: 'eduengage_campaign_name',
last_ad_group_id: 'eduengage_ad_group_id',
last_ad_group_name: 'eduengage_ad_group_name',
last_ad_id: 'eduengage_ad_id',
last_ad_name: 'eduengage_ad_name',
last_creative_id: 'eduengage_creative_id',
last_creative_name: 'eduengage_creative_name',
last_keyword: 'eduengage_keyword',
last_matchtype: 'eduengage_matchtype',
last_network: 'eduengage_network',
last_device: 'eduengage_device',
last_device_model: 'eduengage_device_model',
last_extension: 'eduengage_extension',
last_free_item_id: 'eduengage_free_item_id',
last_placement: 'eduengage_placement',
last_target: 'eduengage_target',
last_interest_location: 'eduengage_interest_location',
last_location: 'eduengage_location',
last_site_source_name: 'eduengage_site_source_name'
};
function setCookie(name, value, days) {
const expires = new Date(Date.now() + days * 864e5).toUTCString();
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=/; secure; SameSite=Lax`;
}
function getCookie(name) {
const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
return match ? decodeURIComponent(match[2]) : null;
}
function getUrlParams() {
const params = {};
new URLSearchParams(window.location.search).forEach((val, key) => {
if (val) params[key] = val;
});
return params;
}
function parseTrackingCookie() {
try {
return JSON.parse(getCookie(COOKIE_NAME) || '{}');
} catch (e) {
console.warn('Error parsing cookie:', e);
return {};
}
}
function buildTrackingCookie(existing, urlParams) {
const result = { ...existing };
for (const key of FIRST_UTM_KEYS) {
const urlVal = urlParams[key];
if (!result[`first_${key}`] && urlVal) {
result[`first_${key}`] = urlVal;
}
}
for (const key of [...FIRST_UTM_KEYS, ...LAST_KEYS]) {
const urlVal = urlParams[key];
if (urlVal) {
result[`last_${key}`] = urlVal;
}
}
return result;
}
function populateFormFields(trackingData) {
for (const key in trackingData) {
const fieldClass = FIELD_MAPPINGS[key];
if (!fieldClass) continue;
const selector = `p.${fieldClass} input`;
try {
const field = document.querySelector(selector);
if (field) field.value = trackingData[key];
} catch (e) {
console.warn(`Field not found for selector: ${selector}`);
}
}
}
const urlParams = getUrlParams();
const existing = parseTrackingCookie();
const updated = buildTrackingCookie(existing, urlParams);
setCookie(COOKIE_NAME, JSON.stringify(updated), COOKIE_EXPIRE_DAYS);
populateFormFields(updated);
})();
</script>
With eduengage_ prefix for all fields:
<script>
(function () {
const COOKIE_NAME = 'eduengage_AdConnect';
const COOKIE_EXPIRE_DAYS = 365;
const UTM_KEYS = [
'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'
];
const OTHER_LAST_KEYS = [
'gclid', 'fbclid', 'ttclid', 'msclkid', 'li_fat_id',
'campaign_id', 'campaign_name', 'ad_group_id', 'ad_group_name',
'ad_id', 'ad_name', 'creative_id', 'creative_name',
'keyword', 'matchtype', 'network', 'device', 'device_model',
'extension', 'free_item_id', 'placement', 'target',
'interest_location', 'location', 'site_source_name'
];
const FIELD_MAPPINGS = {
// 1. First Touch UTMs
first_utm_source: 'eduengage_first_utm_source',
first_utm_medium: 'eduengage_first_utm_medium',
first_utm_campaign: 'eduengage_first_utm_campaign',
first_utm_content: 'eduengage_first_utm_content',
first_utm_term: 'eduengage_first_utm_term',
// 2. Session UTMs (Now behaves like Last Touch)
utm_source: 'eduengage_utm_source',
utm_medium: 'eduengage_utm_medium',
utm_campaign: 'eduengage_utm_campaign',
utm_content: 'eduengage_utm_content',
utm_term: 'eduengage_utm_term',
// 3. Last Touch UTMs
last_utm_source: 'eduengage_last_utm_source',
last_utm_medium: 'eduengage_last_utm_medium',
last_utm_campaign: 'eduengage_last_utm_campaign',
last_utm_content: 'eduengage_last_utm_content',
last_utm_term: 'eduengage_last_utm_term',
// Other Last Touch Parameters
last_gclid: 'eduengage_gclid',
last_fbclid: 'eduengage_fbclid',
last_ttclid: 'eduengage_ttclid',
last_msclkid: 'eduengage_msclkid',
last_li_fat_id: 'eduengage_li_fat_id',
last_campaign_id: 'eduengage_campaign_id',
last_campaign_name: 'eduengage_campaign_name',
last_ad_group_id: 'eduengage_ad_group_id',
last_ad_group_name: 'eduengage_ad_group_name',
last_ad_id: 'eduengage_ad_id',
last_ad_name: 'eduengage_ad_name',
last_creative_id: 'eduengage_creative_id',
last_creative_name: 'eduengage_creative_name',
last_keyword: 'eduengage_keyword',
last_matchtype: 'eduengage_matchtype',
last_network: 'eduengage_network',
last_device: 'eduengage_device',
last_device_model: 'eduengage_device_model',
last_extension: 'eduengage_extension',
last_free_item_id: 'eduengage_free_item_id',
last_placement: 'eduengage_placement',
last_target: 'eduengage_target',
last_interest_location: 'eduengage_interest_location',
last_location: 'eduengage_location',
last_site_source_name: 'eduengage_site_source_name'
};
function setCookie(name, value, days) {
const expires = new Date(Date.now() + days * 864e5).toUTCString();
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=/; secure; SameSite=Lax`;
}
function getCookie(name) {
const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
return match ? decodeURIComponent(match[2]) : null;
}
function getUrlParams() {
const params = {};
new URLSearchParams(window.location.search).forEach((val, key) => {
if (val) params[key] = val;
});
return params;
}
function parseTrackingCookie() {
try {
return JSON.parse(getCookie(COOKIE_NAME) || '{}');
} catch (e) {
console.warn('Error parsing cookie:', e);
return {};
}
}
function buildTrackingCookie(existing, urlParams) {
const result = { ...existing };
// This loop handles the UTM parameters
for (const key of UTM_KEYS) {
const urlVal = urlParams[key];
// Only proceed if a non-empty value is in the URL
if (urlVal) {
// 1. First Touch Logic: Set only if it doesn't already exist.
if (!result[`first_${key}`]) {
result[`first_${key}`] = urlVal;
}
// 2. Session & Last Touch Logic: Update with the new value.
result[key] = urlVal;
result[`last_${key}`] = urlVal;
}
}
// This loop handles all other parameters (gclid, etc.)
for (const key of OTHER_LAST_KEYS) {
const urlVal = urlParams[key];
// Only update if a new value is present
if (urlVal) {
result[`last_${key}`] = urlVal;
}
}
return result;
}
function populateFormFields(trackingData) {
for (const key in trackingData) {
const fieldClass = FIELD_MAPPINGS[key];
if (!fieldClass) continue;
const selector = `p.${fieldClass} input, .${fieldClass} input, input.${fieldClass}`;
try {
const field = document.querySelector(selector);
if (field && trackingData[key]) {
field.value = trackingData[key];
}
} catch (e) {
console.warn(`Field not found for selector: ${selector}`);
}
}
}
const urlParams = getUrlParams();
const existing = parseTrackingCookie();
const updated = buildTrackingCookie(existing, urlParams);
setCookie(COOKIE_NAME, JSON.stringify(updated), COOKIE_EXPIRE_DAYS);
populateFormFields(updated);
})();
</script>
To test the cookie, use a URL like:
https://hello.eduhub.solutions/landingpage?utm_source=google&utm_medium=cpc&utm_campaign=summer_campaign&utm_content=text_ad_1&utm_term=engineering+program&gclid=TEST-GCLID-123&fbclid=TEST-FBCLID-456&ttclid=TEST-TTCLID-789&msclkid=TEST-MSCLKID-002&li_fat_id=TEST-LIFAT-001&ad_group_id=AGID1&ad_group_name=AdGroupName&ad_id=ADID123&ad_name=AdName123&campaign_id=CID321&campaign_name=CampName&creative_id=CRID456&creative_name=CreativeTest&device=mobile&device_model=Pixel5&extension=EXT1&free_item_id=FREE123&interest_location=Berlin&location=Germany&matchtype=broad&network=search&placement=google.com&site_source_name=google&target=students&keyword=engineering
To send events to Meta and Google Ads, implement flows manually in Salesforce.
utm_source=google&utm_medium=paid&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}&campaign_id={campaignid}&ad_group_id={adgroupid}&creative_id={creative}&keyword={keyword}&matchtype={matchtype}&network={network}&device={device}&device_model={devicemodel}&extension={extensionid}&free_item_id={feeditemid}&placement={placement}&target={target}&interest_location={loc_interest_ms}&location={loc_physical_ms}
utm_source=meta&utm_medium=paid&utm_campaign={{campaign.name}}&utm_content={{adset.name}}&utm_term={{ad.name}}&campaign_id={{campaign.id}}&campaign_name={{campaign.name}}&ad_group_id={{adset.id}}&ad_group_name={{adset.name}}&ad_id={{ad.id}}&ad_name={{ad.name}}&placement={{placement}}&site_source_name={{site_source_name}}
utm_source=tiktok&utm_medium=paid&utm_campaign=__CAMPAIGN_NAME__&utm_content=__AID_NAME__&utm_term=__CID_NAME__&campaign_id=__CAMPAIGN_ID__&campaign_name=__CAMPAIGN_NAME__&ad_group_id=__AID__&ad_group_name=__AID_NAME__&creative_id=__CID__&creative_name=__CID_NAME__&placement=__PLACEMENT__
utm_source=linkedin&utm_medium=paid&utm_campaign={{CAMPAIGN_NAME}}&utm_term={{CREATIVE_NAME}}&account_id={{ACCOUNT_ID}}&account_name={{ACCOUNT_NAME}}&campaign_group_id={{CAMPAIGN_GROUP_ID}}&campaign_group_name={{CAMPAIGN_GROUP_NAME}}&campaign_id={{CAMPAIGN_ID}}&campaign_name={{CAMPAIGN_NAME}}&creative_id={{CREATIVE_ID}}&creative_name={{CREATIVE_NAME}
utm_source=bing&utm_medium=paid&utm_campaign={Campaign}&utm_content={AdGroup}&campaign_id={CampaignId}&campaign_name={Campaign}&ad_group_id={AdGroupId}&ad_group_name={AdGroup}&ad_id={AdId}&matchtype={MatchType}&network={Network}&device={Device}&free_item_id={feeditemid}&target={TargetId}&interest_location={loc_interest_ms}&location={loc_physical_ms}