From 0c1210a1dca35a64367ec6ad708b4d0f8b49c314 Mon Sep 17 00:00:00 2001 From: Ian Ker-Seymer Date: Thu, 19 Nov 2020 16:17:52 -0500 Subject: [PATCH] Add support for fbclid --- src/js/init.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/init.js b/src/js/init.js index 04f6d74..27e6b34 100644 --- a/src/js/init.js +++ b/src/js/init.js @@ -35,6 +35,7 @@ module.exports = function(prefs) { typeof get_param.utm_term !== 'undefined' || typeof get_param.gclid !== 'undefined' || typeof get_param.yclid !== 'undefined' || + typeof get_param.fbclid !== 'undefined' || typeof get_param[p.campaign_param] !== 'undefined' || typeof get_param[p.term_param] !== 'undefined' || typeof get_param[p.content_param] !== 'undefined' @@ -79,6 +80,8 @@ module.exports = function(prefs) { __sbjs_medium = get_param.utm_medium; } else if (typeof get_param.gclid !== 'undefined') { __sbjs_medium = 'cpc'; + } else if (typeof get_param.fbclid !== 'undefined') { + __sbjs_medium = 'cpc'; } else if (typeof get_param.yclid !== 'undefined') { __sbjs_medium = 'cpc'; } else { @@ -93,6 +96,8 @@ module.exports = function(prefs) { __sbjs_campaign = 'google_cpc'; } else if (typeof get_param.yclid !== 'undefined') { __sbjs_campaign = 'yandex_cpc'; + } else if (typeof get_param.fbclid !== 'undefined' && typeof get_param.fb_campaign !== 'undefined') { + __sbjs_campaign = get_param.fb_campaign; } else { __sbjs_campaign = terms.none; }