hlxsites / vg-volvotrucks-us

Franklin site for https://www.volvotrucks.us/
https://www.volvotrucks.us/
Apache License 2.0
2 stars 5 forks source link

Add Tik Tok Web Container to Volvo Trucks NA #611

Closed KJohnsn closed 2 weeks ago

KJohnsn commented 2 months ago

URL VolvoTrucks.US

Purpose To better optimize and measure campaign performance — specifically retargeting visitors from the site.

Category Name Social Media Cookies

Category Id C0005

Description These cookies are set by a range of social media services that we have added to the site to enable you to share our content with your friends and networks. They are capable of tracking your browser across other sites and building up a profile of your interests. This may impact the content and messages you see on other websites you visit. If you do not allow these cookies you may not be able to use or see these sharing tools.

Performance Cookies Category Id C0002

Description These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

Functional Cookies Category Id C0003

Description These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.

Targeting Cookies Category Id C0004

Description These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.

Instructions

Image

Pixel Information The following information is used to identify your pixel and in your base code.

Pixel ID COGKTO3C77U0VOQQGM8G This is the unique number assigned to your pixel.

Pixel Name Volvo Trucks NA Tik Tok Website Pixel

Pixel SDK Configuration Follow these steps to complete setting up events with Pixel SDK.

1. Copy the pixel code

<script> !function (w, d, t) { w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var
i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new
Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)}; ttq.load('COGKTO3C77U0VOQQGM8G');
ttq.page(); }(window, document, 'ttq'); </script> 
  1. Paste the pixel code in the header section of your website Add the code between the tags. TikTok pixel code can be added above or below other tracking tags (such as Google Analytics) in your website header.

Image

  1. Add event code and parameters using this payload
    
    // Identifying the user with hashed details
    ttq.identify({
    "email": "<hashed_email_address>", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side.
    "phone_number": "<hashed_phone_number>", // string. The phone number of the customer if available. It must be hashed with SHA-256 on the client side.
    "external_id": "<hashed_external_id>" // string. A unique ID from the advertiser such as user or external cookie IDs. It must be hashed with SHA256 on the client side.
    });

// Tracking various user interactions ttq.track('SubmitForm', { "value": "", // number. Value of the order or items sold. Example: 100. "currency": "", // string. The 4217 currency code. Example: "USD". "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". } ] });

ttq.track('ClickButton', { "value": "", // number. Value of the order or items sold. Example: 100. "currency": "", // string. The 4217 currency code. Example: "USD". "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". } ] });

// Repeat similar structure for 'Download', 'CompletePayment', 'Contact', 'CompleteRegistration', // 'ViewContent', 'AddToCart', 'PlaceAnOrder', 'AddPaymentInfo', 'InitiateCheckout', 'Search', // 'AddToWishlist', 'Subscribe', and 'Pageview' events with appropriate parameters and comments.



**Acceptance Criteria**
- [ ] The Tik Tok container has the correct Pixel ID included
- [ ] The Pixel Name is correct
- [ ] The container collects the analytics data correctly
santi-homps commented 1 month ago

I think the event code and parameters are missing here right? For example... I tested this code and I get this:

Screenshot 2024-05-20 at 6 06 39 PM
Kannan-CM commented 1 month ago

Reached out to agency and awaiting their support.

ZoeBeykirch commented 1 month ago

Agency update - "I just went into TikTok and am seeing the same errors on my end. It does look like data is pulling in from the pixel which is good, but let me reach out to TikTok support to figure out if anything needs to be modified in the code, and I’ll let you know asap."

KJohnsn commented 1 month ago

Agency update:

"(Lauren has) submitted a ticket to TikTok support with all the information (we) have provided. They should follow up with (her) shortly and (she) will keep (us) updated!"

Kannan-CM commented 1 month ago

Hi @santi-homps ,

here is the response from the agency:

"spoke with TikTok support and they let me know the error is only for their advance matching system which tracks users email & phone numbers. Since we are not concerned with tracking those things we may ignore the error and move forward with the implementation. Please let me know if you have any other questions or concerns!"