@artisan-commerce/analytics-web 0.2.0-canary.97 → 0.2.0-canary.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,7 +52,7 @@
52
52
 
53
53
  var name = "@artisan-commerce/analytics-web";
54
54
  var description = "Artisn commerce analytics web library";
55
- var version = "0.2.0-canary.96";
55
+ var version = "0.2.0-canary.97";
56
56
  var main = "./dist/bundle.cjs.js";
57
57
  var module = "./dist/bundle.esm.js";
58
58
  var types = "./dist/bundle.d.ts";
@@ -426,7 +426,7 @@ ${key}: ${value}`;
426
426
  initTag.innerText = `!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='${this.version}';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '${this.trackingId}');fbq('trackSingle', '${this.trackingId}', 'PageView');`;
427
427
  const noScript = document.createElement("noscript");
428
428
  noScript.innerHTML = `
429
- <img height="1" width="1" style="display:none"
429
+ <img height="1" width="1" style="display:none"
430
430
  src="https://www.facebook.com/tr?id={${this.trackingId}}&noscript=1"/>
431
431
  `;
432
432
  document.head.appendChild(linkTag);
@@ -819,7 +819,7 @@ ${key}: ${value}`;
819
819
 
820
820
  const postFacebookConversion = async (config) => {
821
821
  const { apiURL, eventName, customData, authToken } = config;
822
- const { eventSourceUrl } = config;
822
+ const { eventSourceUrl, testCode } = config;
823
823
  const { countryISOCode, fbAccessToken, fbPixelId } = config;
824
824
  const { platform = "web" } = customData != null ? customData : {};
825
825
  const { debug } = State().state;
@@ -834,7 +834,8 @@ ${key}: ${value}`;
834
834
  countryISOCode,
835
835
  customData,
836
836
  fbAccessToken,
837
- fbPixelId
837
+ fbPixelId,
838
+ testCode
838
839
  };
839
840
  try {
840
841
  const data = await fetch(url, {