Facebook
From a, 7 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 437
  1. // add this before event code to all pages where PII data postback is expected and appropriate
  2. ttq.identify({
  3.   "email": "<hashed_email_address>", // string. The email of the customer if available. It must be hashed with SHA-256 on the client side.
  4.   "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.
  5.   "external_id": "<hashed_extenal_id>", // A unique ID from the advertiser such as user or external cookie IDs. It must be hashed with SHA256 on the client side.
  6. });
  7.  
  8. ttq.track('ViewContent', {
  9.   "contents": [{
  10.     "content_id": "<content_identifier>", // string. ID of the product. Example: "1077218".
  11.     "content_type": "<content_type>", // string. Either product or product_group.
  12.     "content_name": "<content_name>", // string. The name of the page or product. Example: "shirt".
  13.   }],
  14.   "value": "<content_value>", // number. Value of the order or items sold. Example: 100.
  15.   "currency": "<content_currency>", // string. The 4217 currency code. Example: "USD".
  16. });
  17.  
  18. ttq.track('click button', {
  19.   "contents": [{
  20.     "content_id": "<content_identifier>", // string. ID of the product. Example: "1077218".
  21.     "content_type": "<content_type>", // string. Either product or product_group.
  22.     "content_name": "<content_name>", // string. The name of the page or product. Example: "shirt".
  23.   }],
  24.   "value": "<content_value>", // number. Value of the order or items sold. Example: 100.
  25.   "currency": "<content_currency>", // string. The 4217 currency code. Example: "USD".
  26. });
  27.  
  28. ttq.track('ClickButton', {
  29.   "contents": [{
  30.     "content_id": "<content_identifier>", // string. ID of the product. Example: "1077218".
  31.     "content_type": "<content_type>", // string. Either product or product_group.
  32.     "content_name": "<content_name>", // string. The name of the page or product. Example: "shirt".
  33.   }],
  34.   "value": "<content_value>", // number. Value of the order or items sold. Example: 100.
  35.   "currency": "<content_currency>", // string. The 4217 currency code. Example: "USD".
  36. });