Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Ticketing: Embed a Meta / Google tracker on the store

Update 08/27/2026

This guide provides the list of triggers to use for your Google Tags and Meta (Facebook) pixel trackers in your store (as part of the Infomaniak ticketing system).

 

Prerequisites

 

Examples of Meta Pixel and Google Tags

Refer to the external documentation for the Meta pixel:

!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','{{URL_4}}');

document.addEventListener("ike_event_view", function( e ) {
  fbq('init', '14085424191xxxxx');
  fbq('track', "PageView");
  fbq('track', 'InitiateCheckout');
});

document.addEventListener("ike_cart_payment_launched", function( e ) {
  fbq('init', '14085424191xxxxx');
  fbq('track', "PageView");
  fbq('track', 'Purchase', {value: e.detail.topaid, currency: e.detail.currency.name});
});

… and for Google Tag Manager (GTM) + gtag.js:

window.dataLayer = window.dataLayer || [ ];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxx-x');

document.addEventListener("ike_event_view", function( e ) {
  gtag('event', 'view_item', {
    'event_category' : e.detail.name,
    'event_label' : e.detail.date
  });
});

document.addEventListener("ike_cart_add", function( e ) {
  gtag('event', 'add_to_cart');
});

document.addEventListener("ike_cart_confirm", function( ) {
  gtag('event', 'checkout_progress', {
    'event_category' :'valid cart'
  });
});

document.addEventListener("ike_cart_payment_launched", function( e ) {
  gtag('event', 'add_payment_info', {
    'event_category' : 'paiement',
    'event_label' : e.detail.currency.name,
    'value': e.detail.topaid
  });
});

In Google Tag Manager, make sure that the tag format is correct:

(view_item|add_cart|add_payment_info)

 

CSP and its impact on conversion tracking

The “Content Security Policy” (CSP) is a web security policy that protects pages against certain attacks such as Cross-Site Scripting (XSS) and the injection of malicious content. However, it can also block certain legitimate scripts, such as Meta tracking pixels or Google Tag Manager, thus preventing conversion tracking from working properly.

Why are some pixels not working?

If your website displays an error related to the Content Security Policy (CSP), particularly in the browser's developer tools console or network tab, it means that some third-party scripts – such as Google tags or Meta (Facebook) pixels – are being blocked. To ensure that conversion tracking works correctly on your store, it is necessary to add a specific exception to your site's CSP configuration to allow the resources used by the Infomaniak ticketing system.

Key CSP directives impacting tracking

  • script-src: defines the allowed sources for scripts.
  • img-src: controls images (including <img> tags used for tracking pixels).
  • connect-src: manages tracking requests sent to marketing tool servers.

For example, if you use Google Tag Manager or Facebook Pixel, make sure your CSP policy explicitly allows loading scripts and sending data to their domains. Here is an example of directives to include in your CSP, which you should adapt according to your configuration:

script-src 'self' {{URL_7}} {{URL_8}} {{URL_9}}
img-src 'self' {{URL_10}} {{URL_11}}
connect-src 'self' {{URL_12}} {{URL_13}}

Google provides a detailed guide on configuring a CSP that is compatible with its tracking tools.

Also, check that your security management system (application firewall, CDN, CMS) is not blocking these resources, and make the necessary adjustments to allow tracking events to trigger correctly.

If your CSP is too restrictive, it may prevent third-party scripts from loading, such as:

  • Facebook Pixel (connect.facebook.net)
  • Google Tag Manager (GTM) (www.googletagmanager.com)
  • Google Analytics (www.google-analytics.com)

Errors visible in the developer console (browser's Developer Tools):

Refused to load the script '{{URL_15}}'
because it violates the following Content Security Policy directive: "script-src 'self'"
  • No data in Google Analytics or Facebook Ads Manager.
  • Events defined in GTM are not triggering.

When the CSP blocks these resources, they cannot collect data on visitors or record conversion events.

 

Complete list of triggers

Home page:

trigger: ike_home_view
Data: none

document.addEventListener("ike_home_view", function(e) {
  //send to your tracking tool
});

Event page:

Page of an event with multiple dates
trigger: ike_event_view
Data: detail.name

document.addEventListener("ike_event_view", function(e) {
  console.log(e.detail.name); 
  //send to your tracking tool
});

Date page:

Page displaying the date of an event
trigger: ike_date_view
Data: detail.name, detail.date

document.addEventListener("ike_date_view", function(e) {
  console.log(e.detail.name, e.detail.date);
  //send to your tracking tool
});

Pass page:

Page of a pass category
trigger: ike_abo_view
Data: detail.name

document.addEventListener("ike_abo_view", function(e) {
  console.log(e.detail.name);
  //send to your tracking tool
});

Pass selection page:

Page for selecting pass dates
trigger: ike_abo_selection
Data: detail (cart details)

document.addEventListener("ike_abo_selection", function(e) {
  console.log(e.detail.name, e.detail.date);
  //send to your tracking tool
});

User login:

Triggered on successful login
trigger: ike_user_login
Data: detail (cart details)

document.addEventListener("ike_user_login", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

User logout:

trigger: ike_user_logout
Data: detail (cart details)

document.addEventListener("ike_user_logout", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart add:

Triggered when an item is added to the cart.

trigger: ike_cart_add
Data: detail (cart details)

document.addEventListener("ike_cart_add", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart page:

trigger: ike_cart_view
Data: detail (cart details)

document.addEventListener("ike_cart_view", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart update:

Triggered when a cart item is updated

trigger: ike_cart_update
Data: detail (cart details)

document.addEventListener("ike_cart_update", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart is empty:

Triggered when the empty button is pressed.

trigger: ike_cart_empty
Data: detail (cart details)

document.addEventListener("ike_cart_empty", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart confirm:

Triggered when the confirm button is pressed

trigger: ike_cart_confirm
Data: detail (cart details)

document.addEventListener("ike_cart_confirm", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart delivery page:

trigger: ike_cart_delivery_view
Data: detail (cart details)

document.addEventListener("ike_cart_delivery_view", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart form page:

trigger: ike_cart_form_view
Data: detail (cart details)

document.addEventListener("ike_cart_form_view", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart payment page:

trigger: ike_cart_payment_view
Data: detail (cart details with paymentMethodSelected)

document.addEventListener("ike_cart_payment_view", function(e) {
  console.log(e.detail);
  //send to your tracking tool 
});

Cart payment changed:

trigger: ike_cart_payment_changed
Data: detail.path

document.addEventListener("ike_cart_payment_changed", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart payment initiated:

trigger: ike_cart_payment_launched
Data: detail (cart details)

document.addEventListener("ike_cart_payment_launched", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart payment success page:

trigger: ike_cart_payment_success
Data: detail (cart details)

document.addEventListener("ike_cart_payment_success", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Cart delete item:

trigger: ike_cart_delete
Data: detail (previousCart and newCart)

document.addEventListener("ike_cart_delete", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Page Changed:

trigger: ike_page_changed
Data: detail.path

document.addEventListener("ike_page_changed", function(e) {
  console.log(e.detail);
  //send to your tracking tool
});

Has this FAQ been helpful?