//footer (function() { function addFooterContent() { var footerContainer = document.querySelector(".copyrights.text-sm.opacity-75"); if (footerContainer && !footerContainer.querySelector(".extra-footer-content")) { var newContent = document.createElement("span"); newContent.classList.add("extra-footer-content"); newContent.innerHTML = ' | Run by: ' + 'Skylight'; footerContainer.appendChild(newContent); } } // تشغيل الكود عند تحميل الصفحة document.addEventListener("DOMContentLoaded", addFooterContent); // استخدام setInterval للتأكد من تنفيذ الكود إذا لم يكن الفوتر متاحًا فور التحميل var checkExist = setInterval(function() { if (document.querySelector(".copyrights.text-sm.opacity-75")) { addFooterContent(); clearInterval(checkExist); // إيقاف التحقق بعد نجاح التنفيذ } }, 500); // التحقق كل نصف ثانية })(); // add this before event code to all pages where PII data postback is expected and appropriate ttq.identify({ "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "phone_number": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "external_id": "" // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. }); ttq.track('ViewContent', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }, { "event_id": "" // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". }); ttq.track('AddToCart', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }, { "event_id": "" // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". }); ttq.track('CompletePayment', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }, { "event_id": "" // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". }); ttq.track('InitiateCheckout', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }, { "event_id": "" // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". }); curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/event/track/' --header 'Access-Token: ACCESS_TOKEN' --header 'Content-Type: application/json' --data-raw '{ "event_source": "web", "event_source_id": "CPVCC2JC77UA4KP658U0", "data": [ { "event": "ViewContent", "event_id": "", // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". "event_time": "", // number. The time that the event took place. Use unix timestamp. Example: 1697783008. "user": { "ttclid": "", // string. TikTok Click ID (ttclid) or a tracking parameter added to a landing page URL whenever a user clicks on an ad on TikTok. It starts with "E.C.P.". "external_id": "", // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. "phone": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "ttp": "<_ttp>", // string. Cookie ID saved in the _ttp cookie when you use Pixel SDK and enable cookies. Example: "2F7h37YkS1j57AYSKTI7IHhJPYH" "ip": "", // string. Non-hashed public IP address of the browser. "user_agent": "" // string. Non-hashed user agent from the user’s device. Example: "Chrome/91.0.4472.124". }, "page": { "url": "" // string. The page URL where the event took place. Example: "http://demo.mywebsite.com/purchase" }, "properties": { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". } } ] }' curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/event/track/' --header 'Access-Token: ACCESS_TOKEN' --header 'Content-Type: application/json' --data-raw '{ "event_source": "web", "event_source_id": "CPVCC2JC77UA4KP658U0", "data": [ { "event": "AddToCart", "event_id": "", // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". "event_time": "", // number. The time that the event took place. Use unix timestamp. Example: 1697783008. "user": { "ttclid": "", // string. TikTok Click ID (ttclid) or a tracking parameter added to a landing page URL whenever a user clicks on an ad on TikTok. It starts with "E.C.P.". "external_id": "", // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. "phone": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "ttp": "<_ttp>", // string. Cookie ID saved in the _ttp cookie when you use Pixel SDK and enable cookies. Example: "2F7h37YkS1j57AYSKTI7IHhJPYH" "ip": "", // string. Non-hashed public IP address of the browser. "user_agent": "" // string. Non-hashed user agent from the user’s device. Example: "Chrome/91.0.4472.124". }, "page": { "url": "" // string. The page URL where the event took place. Example: "http://demo.mywebsite.com/purchase" }, "properties": { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". } } ] }' curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/event/track/' --header 'Access-Token: ACCESS_TOKEN' --header 'Content-Type: application/json' --data-raw '{ "event_source": "web", "event_source_id": "CPVCC2JC77UA4KP658U0", "data": [ { "event": "CompletePayment", "event_id": "", // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". "event_time": "", // number. The time that the event took place. Use unix timestamp. Example: 1697783008. "user": { "ttclid": "", // string. TikTok Click ID (ttclid) or a tracking parameter added to a landing page URL whenever a user clicks on an ad on TikTok. It starts with "E.C.P.". "external_id": "", // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. "phone": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "ttp": "<_ttp>", // string. Cookie ID saved in the _ttp cookie when you use Pixel SDK and enable cookies. Example: "2F7h37YkS1j57AYSKTI7IHhJPYH" "ip": "", // string. Non-hashed public IP address of the browser. "user_agent": "" // string. Non-hashed user agent from the user’s device. Example: "Chrome/91.0.4472.124". }, "page": { "url": "" // string. The page URL where the event took place. Example: "http://demo.mywebsite.com/purchase" }, "properties": { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". } } ] }' curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/event/track/' --header 'Access-Token: ACCESS_TOKEN' --header 'Content-Type: application/json' --data-raw '{ "event_source": "web", "event_source_id": "CPVCC2JC77UA4KP658U0", "data": [ { "event": "InitiateCheckout", "event_id": "", // string. A hashed ID that can identify a unique event. Example: "1616318632825_357". "event_time": "", // number. The time that the event took place. Use unix timestamp. Example: 1697783008. "user": { "ttclid": "", // string. TikTok Click ID (ttclid) or a tracking parameter added to a landing page URL whenever a user clicks on an ad on TikTok. It starts with "E.C.P.". "external_id": "", // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. "phone": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "ttp": "<_ttp>", // string. Cookie ID saved in the _ttp cookie when you use Pixel SDK and enable cookies. Example: "2F7h37YkS1j57AYSKTI7IHhJPYH" "ip": "", // string. Non-hashed public IP address of the browser. "user_agent": "" // string. Non-hashed user agent from the user’s device. Example: "Chrome/91.0.4472.124". }, "page": { "url": "" // string. The page URL where the event took place. Example: "http://demo.mywebsite.com/purchase" }, "properties": { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". } } ] }' { "event_source": "web", "event_source_id": "CPVCC2JC77UA4KP658U0", "data": [ { "event": "InitiateCheckout", "event_time": "946684800000", "user": {}, "properties": { "contents": [ {} ] }, "page": {} } ] } curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/event/track/' --header 'Access-Token: <>' --header 'Content-Type: application/json' --data-raw '{"event_source":"web","event_source_id":"CPVCC2JC77UA4KP658U0","data":[{"event":"InitiateCheckout","event_time":"946684800000","user":{},"properties":{"contents":[{}]},"page":{}}]}' # With Standard Library (urllib) from urllib3 import request, parse payload_data = {"event_source":"web","event_source_id":"CPVCC2JC77UA4KP658U0","data":[{"event":"InitiateCheckout","event_time":"946684800000","user":{},"properties":{"contents":[{}]},"page":{}}]} data = parse.urlencode(payload_data).encode() req = request.Request( 'https://business-api.tiktok.com/open_api/v1.3/event/track/', data=data, method='POST' ) req.add_header('Access-Token', '<>') req.add_header('Content-Type', 'application/json') with request.urlopen(req) as response: the_page = response.read() print(the_page) # With Requests Library import requests payload_data = {"event_source":"web","event_source_id":"CPVCC2JC77UA4KP658U0","data":[{"event":"InitiateCheckout","event_time":"946684800000","user":{},"properties":{"contents":[{}]},"page":{}}]} response = requests.post( 'AAA.com', headers={ 'Access-Token': '<>', 'Content-Type': 'application/json' }, json=payload_data ) print(response.text) // Using HTTP - standard library const http = require('node:http'); const postData = {"event_source":"web","event_source_id":"CPVCC2JC77UA4KP658U0","data":[{"event":"InitiateCheckout","event_time":"946684800000","user":{},"properties":{"contents":[{}]},"page":{}}]}; const options = { hostname: 'business-api.tiktok.com', protocol: 'https', port: 80, path: '/open_api/v1.3/event/track/', method: 'POST', headers: { 'Access-Token': '<>', 'Content-Type': 'application/json' } }; const req = http.request(options, (res) => { console.log('STATUS:', res.statusCode); console.log('HEADERS:', res.headers); res.setEncoding('utf8'); res.on('data', (chunk) => { console.log('BODY:', chunk); }); res.on('end', () => { console.log('No more data in response.'); }); }); req.on('error', (e) => { console.error('problem with request:', e.message); }); req.write(postData); req.end(); // Using Axios const axios = require('axios'); axios.post( 'https://business-api.tiktok.com/open_api/v1.3/event/track/', {"event_source":"web","event_source_id":"CPVCC2JC77UA4KP658U0","data":[{"event":"InitiateCheckout","event_time":"946684800000","user":{},"properties":{"contents":[{}]},"page":{}}]}, { headers: { 'Access-Token': '<>', 'Content-Type': 'application/json' } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); git clone https://github.com/tiktok/tiktok-business-api-sdk.git cd your_path/tiktok-business-api-sdk/java_sdk mvn install package // add this before event code to all pages where PII data postback is expected and appropriate ttq.identify({ "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "phone_number": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "external_id": "" // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. }); ttq.track('ViewContent', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('AddToCart', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('CompletePayment', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('InitiateCheckout', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); put_pixel_code_here snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) put_pixel_code_here snaptr('track', 'ADD_CART', {'price': INSERT_PRICE, 'currency': 'INSERT_CURRENCY', 'item_ids': ['INSERT_ITEM_ID_1', 'INSERT_ITEM_ID_2'], 'item_category': 'INSERT_ITEM_CATEGORY', 'number_items': INSERT_NUMBER_ITEMS, 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'LEVEL_COMPLETE', {'level': 'INSERT_LEVEL', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'PAGE_VIEW', {'item_ids': ['INSERT_ITEM_ID_1', 'INSERT_ITEM_ID_2'], 'item_category': 'INSERT_ITEM_CATEGORY', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'PURCHASE', {'price': INSERT_PRICE, 'currency': 'INSERT_CURRENCY', 'transaction_id': 'INSERT_TRANSACTION_ID', 'item_ids': ['INSERT_ITEM_ID_1', 'INSERT_ITEM_ID_2'], 'item_category': 'INSERT_ITEM_CATEGORY', 'number_items': INSERT_NUMBER_ITEMS, 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'START_CHECKOUT', {'price': INSERT_PRICE, 'currency': 'INSERT_CURRENCY', 'item_ids': ['INSERT_ITEM_ID_1', 'INSERT_ITEM_ID_2'], 'item_category': 'INSERT_ITEM_CATEGORY', 'number_items': INSERT_NUMBER_ITEMS, 'payment_info_available': INSERT 1/0, 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'VIEW_CONTENT', {'price': INSERT_PRICE, 'currency': 'INSERT_CURRENCY', 'item_ids': ['INSERT_ITEM_ID_1', 'INSERT_ITEM_ID_2'], 'item_category': 'INSERT_ITEM_CATEGORY', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) put_pixel_code_here snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'COMPLETE_TUTORIAL', {'level': 'INSERT_LEVEL', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'PAGE_VIEW', {'item_ids': ['INSERT_ITEM_ID_1', 'INSERT_ITEM_ID_2'], 'item_category': 'INSERT_ITEM_CATEGORY', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'COMPLETE_TUTORIAL', {'level': 'INSERT_LEVEL', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'COMPLETE_TUTORIAL', {'level': 'INSERT_LEVEL', 'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) snaptr('track', 'AD_CLICK', {'uuid_c1': 'INSERT_UUID_C1', 'user_email': 'INSERT_USER_EMAIL', 'user_phone_number': 'INSERT_USER_PHONE_NUMBER', 'user_hashed_email': 'INSERT_USER_HASHED_EMAIL', 'user_hashed_phone_number': 'INSERT_USER_HASHED_PHONE_NUMBER'}) /* HIGGY's CODE HIGGY's CODE HIGGY's CODE */ document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("img").forEach(e=>{e.classList.contains("critical")||e.hasAttribute("loading")||(e.setAttribute("loading","lazy"),e.setAttribute("decoding","async"))});const e=document.querySelector(".lcp-image");if(e){const t=document.createElement("link");t.rel="preload",t.href=e.src,t.as="image",document.head.appendChild(t)}["/fonts/harir-regular.woff2","/fonts/harir-bold.woff2","https://your-cdn/sallaicons.ttf"].forEach(e=>{const t=document.createElement("link");t.rel="preload",t.href=e,t.as="font",t.type="font/woff2",t.crossOrigin="anonymous",document.head.appendChild(t)}),window.addEventListener("load",()=>{["https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"].forEach(e=>{const t=document.createElement("script");t.src=e,t.async=!0,document.body.appendChild(t)})}),"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(()=>{console.log("Service Worker Registered")}).catch(e=>{console.error("Service Worker Registration Failed:",e)}),document.querySelectorAll("script[src]").forEach(e=>{e.classList.contains("essential")||(e.defer=!0)}),document.querySelectorAll("img").forEach(e=>{e.hasAttribute("width")&&e.hasAttribute("height")||(e.setAttribute("width",e.naturalWidth||300),e.setAttribute("height",e.naturalHeight||300))});const t=document.createElement("style");t.textContent="img{max-width:100%;height:auto;display:block;}body{margin:0;padding:0;}",document.head.appendChild(t)}); // add this before event code to all pages where PII data postback is expected and appropriate ttq.identify({ "email": "", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side. "phone_number": "", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side. "external_id": "" // string. Any unique identifier, such as loyalty membership IDs, user IDs, and external cookie IDs.It must be hashed with SHA-256 on the client side. }); ttq.track('ViewContent', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('AddToWishlist', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('Search', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "", // string. The 4217 currency code. Example: "USD". "search_string": "" // string. The word or phrase used to search. Example: "SAVE10COUPON". }); ttq.track('AddPaymentInfo', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('AddToCart', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('InitiateCheckout', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('PlaceAnOrder', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('CompleteRegistration', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". }); ttq.track('Purchase', { "contents": [ { "content_id": "", // string. ID of the product. Example: "1077218". "content_type": "", // string. Either product or product_group. "content_name": "" // string. The name of the page or product. Example: "shirt". } ], "value": "", // number. Value of the order or items sold. Example: 100. "currency": "" // string. The 4217 currency code. Example: "USD". });