Installation + Pixels

Use our JavaScript API on your website and application to track events and deliver engaging digital experiences.

Our JavaScript code is async and will not delay any of the webpage resources.

Base Pixel

Make sure to change the ACCOUNT ID for the base pixel.

<script>
'use strict'; (function (a, b, c) { if (!a.flashy) { a.flashy = function () { a.flashy.event && a.flashy.event(arguments), a.flashy.queue.push(arguments) }, a.flashy.queue = []; var d = document.getElementsByTagName('script')[0], e = document.createElement(b); e.src = c, e.async = !0, d.parentNode.insertBefore(e, d) } })(window, 'script', 'https://js.flashyapp.com/thunder.js'),
flashy('init', __ACCOUNT_ID__); // Make sure to change the Account ID.
</script>

Page View

<script>
flashy('PageView');
</script>

View Content

<script>
flashy('ViewContent', {
'content_ids': ["product_1", "products_2"]
});
</script>

Add To Cart

We suggest to use the UpdateCart instead of AddToCart.

<script>
flashy('AddToCart', {
'content_ids': ["product_ids", "products_1"],
'value': 100,
'currency': 'USD'
});
</script>

Update Cart

We recommend to use the UpdateCart to sync all the contact cart contents, when product removed from the cart or quantity changed.

<script>
flashy('UpdateCart', {
'content_ids': ["product_id"],
'value': 100,
'currency': 'USD'
});
</script>

Purchase

To make sure order not being tracked more than once use the ORDER ID parameter.

<script>
flashy('Purchase', {
'content_ids': ["product_id"],
'value': 100,
'currency': 'USD',
'order_id': '__ORDER_ID__'
});
</script>

Subscribe Contact To a List

You can create contact and also subscribe him to a list, you need the LIST-ID to use that.

<script>
flashy.contacts.create({
"email": "email@address.com",
"first_name": "John",
"last_name": "Doe",
}, LIST-ID);
</script>

Set Contact By Email

Use this function to set the visitor email address, every action after (page views, add to cart), will be added to the contact profile.

We automatically use this function when the URL has email parameter: https://websiteurl.com/?email=email@address.com

<script>
flashy('setCustomer', {
"email": "email@address.com"
});
</script>

‚Äč