Custom scripts

Insert custom script to the initial code of your checkout to enhance its functionality and capabilities.

Updated over a week ago

At this point, you will need to be familiar with JavaScript/CSS to add your content properly on the page. If you struggle with writing code, we recommend you use an HTML generator like this one and copy the code of your content from there: https://html-css-js.com/js/editor/ Alternatively, consult a third-party developer with experience in Shopify.

How to add a script to Checkify

  1. Select the desired type: Script in header or Script in footer.

  2. Choose the page (destination) where you want to add the script: Only for checkout page / Only for Thank You page / Both for checkout and Thank You pages.

  3. Give the script a name by filling Script title.

  4. Add some basic script content in the field below. Please mind the formatting (opening and closing tags).

  5. Do not forget to click Save changes.

You can use some variables in your scripts.

- when you set "Only for Thank You page"

{total_amount_chk}  - order total amount
{items_quantity_chk} - order total quantity
{currency_chk} - currency
{shopify_order_id_chk} - shopify order id
{user_agent_chk} - user agent
{ip_chk} - user ip
{checkout_id_chk} - checkout id
{payment_system_chk} - payment system name
{email_chk} - user email (if present)
{phone_chk} - user phone (if present)
{country_code_chk} - user country

- when you set "Only for checkout page or Both for checkout and Thank You pages"

{total_amount_chk}  - total basket amount
{items_quantity_chk} - total basket quantity
{currency_chk} - currency
{user_agent_chk} - user agent
{ip_chk} - user ip
{checkout_id_chk} - checkout id
{country_code_chk} - user country

Important, do not change the variable format, use it as is. For example, {total_amount_chk} use as {total_amount_chk} in your scripts, like this sample:

<script>fbq('track', 'Purchase', {currency: {currency_chk}, value: {total_amount_chk}});</script>

Some services (like affiliate marketing) may still not work properly if added as a script. Try to experiment by using Google Tag Manager to make them work! Learn about the integration here.

❓ FAQ ❓

πŸ™‹ I want to integrate the Pixel by Triple Whale to my custom checkout.

In order to track visitors who place orders on your store and connect their previous site activity to their purchase, the Triple Pixel must be added via admin.checkify.

  1. Copy the code provided on the Pixel Settings page of Triple Whale app. It may look like this:

  2. Open Admin > Scripts & API > press "Add script +" button.

  3. Select "Script in header", "Both for checkout and thank you pages".

  4. Give your custom script a name.

  5. Paste the snippet of the code (script).

  6. Click "Save changes".

πŸ™‹ I want to integrate Omega Facebook Pixels tracker. Can I do it with Checkify?

Paste the code below into the appropriate section, as described in this article. Attention: it is just an example of the tracking code. It is not a fully working solution.

If any issues, contact us or the support team of the app's publisher. Show them this article, if needed.

<script>
var OT_DATA_CUSTOMER_TRACKFB = {};

if (
localStorage.getItem('OT_DATA_CUSTOMER_TRACKFB') !== null &&
otIsJsonString(localStorage.getItem('OT_DATA_CUSTOMER_TRACKFB'))
) {
OT_DATA_CUSTOMER_TRACKFB = JSON.parse(
localStorage.getItem('OT_DATA_CUSTOMER_TRACKFB')
);
}

!(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 = '2.0';
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", " ", OT_DATA_CUSTOMER_TRACKFB);

fbq('track', 'InitiateCheckout', {
content_type: 'product_group',
currency: ' ',
value: "" + {total_amount_chk},
num_items: "" + {items_quantity_chk}
});
</script>
Did this answer your question?