Barion Pixel API reference: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
No edit summary
 
(61 intermediate revisions by 7 users not shown)
Line 1: Line 1:
__NOTOC__
{{PageTitle|title=Barion Pixel API reference}}
{{NotificationBox|title=WARNING|text=HU: A Barion Pixel jelenleg fejlesztés alatt van, élesben egyelőre nem elérhető. <br>
  EN: Barion Pixel is under construction, it is not available live currently.|color=#FF0000}}
 
{{PageTitle|title=Barion Pixel}}


{| style="margin-left:2em;" align="right"
{| style="margin-left:2em;" align="right"
| __TOC__
| __TOC__
|}
|}
The Barion Pixel is JavaScript code that allows you to track visitor activity on your website. It works by loading a
JavaScript function which you can use whenever a site visitor takes an action that you want to track (this action is
called an event).
In order to implement the Pixel, you will need:
* access to your website's HTML code base
* your Barion Pixel ID that you can access from your Barion Wallet
By default, the Pixel will track pages visited, and the devices your visitors use. In addition, you can use the
Pixel's JavaScript function to track other events that are associated with webshop usage and e-commerce. Without
collecting the consent of the website visitor you must still use the Barion Pixel on your website for fraud management
purposes. (Tracking visitor behavior for the purposes of preventing fraud is considered a legitimate interest of
Barion and the merchant in contract with Barion). The implementation of the base code is considered mandatory for using
the Barion Smart Gateway.
= Implementing the base code =
Implementing the base code is not only required for you to be considered for special offers relating to the Barion
Pixel, but also for using the Barion Smart Gateway at all. This is based on the fact that both Barion and you as the
website owner have a legitimate interest in fraud management, and the data provided by the Barion Pixel greatly helps
these efforts. This, as a legitimate interest case, is fully compliant with the GDPR, and must be implemented
independently of any consent management software that your site may use.
== Init (init) ==
* User intent: View pages on your site
* To be implemented at: Every page load, in the document head tag
* Why do we need this: This provides very basic information on user sessions, and can be implemented very easily
To use the Pixel, you need to add the following code (referred to as the base code) between the opening and closing
<head> tags on every page of your site. Most developers add it to their website's persistent header, so that it appears
automatically on all loaded pages. Be sure to insert your unique Barion Pixel ID at both locations in the provided code
example.
Placing the code within your <head> tags reduces the chances of browsers or third-party code blocking the Pixel's
execution. It also executes the code sooner, increasing the chance that your visitors are tracked before they leave your
page. Sending the data happens asynchronously in the client's browser so that it does not affect user experience.
'''Implementation of the base code'''
    <nowiki>
        <script>
            (function(i,s,o,g,r,a,m){i['BarionAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window, document, 'script', 'https://pixel.barion.com/bp.js', 'bp');
            // send page view event
            bp('init', 'addBarionPixelId', '</nowiki><span style="color:red">[YOUR BARION PIXEL ID GOES HERE]</span><nowiki>');
        </script>
        <noscript>
            <img height="1" width="1" style="display:none" src="https://pixel.barion.com/a.gif?__ba_pixel_id=</nowiki><span style="color:red">[YOUR BARION PIXEL ID GOES HERE]</span><nowiki>&ev=contentView&noscript=1"/>
        </noscript>
    </nowiki>
== Heartbeat (heartbeat) ==
* User intent: Browse your site
* To be implemented at: No further implementation needed beyond the init event
* Why do we need this: This provides information on time spent on your various pages
Heartbeat events are sent each minute from each page that the init event is implemented at, as long as the user does not
navigate away from the page or the session is not considered timed out. It can provide information about time spent
viewing each site by users.
= Minimal implementation =
To be considered for the special contract terms in connection with the implementation of the Barion Pixel's full
marketing capabilities, you have to implement the following events on your site. All events should be implemented in
every location applicable, further detailed below. Events may require parameters, which must be included in the bp
function call as a JS object. This contains additional information about an event, for example product IDs, categories,
and the number of products purchased.


== Consent (grantConsent, rejectConsent) ==
== Consent (grantConsent, rejectConsent) ==
Line 109: Line 19:
interest using this data for fraud management. Rejecting Barion consent however means that the data from that session
interest using this data for fraud management. Rejecting Barion consent however means that the data from that session
will not be used for marketing purposes at all, despite receiving it. All consent events are sent by calling the Pixel's
will not be used for marketing purposes at all, despite receiving it. All consent events are sent by calling the Pixel's
consent function as shown below.
consent function as shown below. Usage of a fully compliant consent management platform (CMP) is strongly recommended by Barion. You can find our recommendation [https://docs.barion.com/Barion_Pixel_Consent_Management_requirements here]




Line 120: Line 30:
     </nowiki>
     </nowiki>


== Encrypting personal data (setEncryptedEmail, setEncryptedPhone) ==


* Firing event: On click or per pageview when email / phone number is globally or occasionally available for the given user.
* User intent: User types in their email (or phone number) for any reason, such as signing in, within checkout when placing an order, signig up for newsletter, etc.
* Why do we need this: More accurate data collection after third party cookie phase out in compliance with GDPR.


== Content View (contentView) ==
We do not collect unencrypted personally identifiable information (PII). All PII data is encrypted by the SHA-1 algorithm that hides the real, human readable email address and phone number.
The encryption process will always happen on Barion side whenever an unencrypted email address (or phone number) is being sent but it is also possible to send a previously SHA-1 encrypted email address (or phone number). Sending an empty string, invalid email address (or phone number) or a not properly hashed value will result in an error message.
'''Please send email with lowercase letter and the phone number as customer type in.'''


* Firing event: ''Page load'' of item pages minimally, preferably on all pages that refers to a single item, offer or promotion
* User intent: View the page that shows a single offer described exclusively
* Why do we need this: Offer descriptions help us know more about your offers


This event should be fired when one of your users enters a page that refers to one of your items that can be bought,
'''setEncryptedEmail / setEncryptedPhone implementation example'''
and describes it in general terms, with an offer to buy. This can be something like an offer page on an e-commerce
website or a product page on a retail site. It is important to not confuse this with a full product detail page where
the product itself is described in greater detail, but there is no information on price, shipping and other details that
are relevant to you offer, like in the case of a product manual.


    <nowiki>
        bp('identity','setEncryptedEmail', '[email protected]');
        bp('identity','setEncryptedPhone', '+36301234567');
    </nowiki>
OR
    <nowiki>
        var hashedEmailAddress = sha1('[email protected]');
        bp('identity','setEncryptedEmail', hashedEmailAddress);


        var hashedPhone = sha1('+36301234567');
        bp('identity','setEncryptedPhone', hashedPhone);


''' Content view event properties '''
    </nowiki>
 
== Content View (contentView) ==
 
* Firing event: ''Page load'' of item pages minimally, preferably on all pages that refers to a single item or other information.
* User intent: View the page that shows a single offer described exclusively or retrieve any information about something.
* Why do we need this: Offer descriptions help us know more about your offers and ecommerce behaviour.
 
 
This event should be fired when one of your users visit a page that refers to one of your items that can be bought
or users read other information about something that is not connected to an item directly (e.g.: news, description, articles, blog posts etc.). Except product page, in most cases the page title is adequate for ''name'' property.


''' Content view event properties  '''
{| class="wikitable"
{| class="wikitable"
! key
! key
Line 162: Line 93:
| YES
| YES
| text
| text
| The full name that you have for the offer, for example a product name (eg. Red Bull 24pcs carton).
| The full name that you have for the offer, for example a product name (eg. Red Bull 24pcs carton) in product page, otherwise in most cases page title is adequate. Please note that item names should be consistent in all events.
|-
|-
! quantity
! quantity
Line 189: Line 120:
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the offer.
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the offer.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 219: Line 150:
| The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 227: Line 158:
| NO
| NO
| integer
| integer
| If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 0 as the checkout initiation.
| If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 1 as the checkout initiation.
|-
|-
! variant
! variant
Line 234: Line 165:
| The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
| The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 253: Line 184:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
            'creative': undefined,
             'customerValue': 150.0,
             'customerValue': 150.0,
             'ean': '9780575115347',
             'ean': '9780575115347',
             'imageUrl': 'https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg',
             'imageUrl': 'https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg',
             'list': 'ProductPage',
             'list': 'ProductPage',
            'position': undefined,
            'step': undefined,
             'variant': 'hardcover'
             'variant': 'hardcover'
         }
         }
Line 275: Line 202:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'creative': 'book_promo_02',
             'creative': 'book_promo_02',
             'customerValue': 150.0,
             'customerValue': 150.0,
Line 281: Line 207:
             'imageUrl': 'https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg',
             'imageUrl': 'https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg',
             'list': 'HomePage',
             'list': 'HomePage',
             'position': '2',
             'positioning': '2',
            'step': undefined,
             'variant': 'hardcover'
             'variant': 'hardcover'
         }
         }
Line 297: Line 222:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'creative': 'also_bought_05',
             'creative': 'also_bought_05',
             'customerValue': 150.0,
             'customerValue': 150.0,
Line 303: Line 227:
             'imageUrl': 'https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg',
             'imageUrl': 'https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '5',
             'positioning': '5',
             'step': 2,
             'step': 2,
             'variant': 'hardcover'
             'variant': 'hardcover'
Line 325: Line 249:
             'unit': 'pcs.',
             'unit': 'pcs.',
             'unitPrice': 300.0,
             'unitPrice': 300.0,
            'brand': undefined,
             'category': 'Pop|Metal',
             'category': 'Pop|Metal',
            'contents': undefined,
            'creative': undefined,
             'customerValue': 150.0,
             'customerValue': 150.0,
            'ean': undefined,
             'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
             'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
             'list': 'ProductPage',
             'list': 'ProductPage',
            'position': undefined,
            'step': undefined,
             'variant': '2019.06.08 20:00|Slane Castle'
             'variant': '2019.06.08 20:00|Slane Castle'
         }
         }
Line 347: Line 265:
             'unit': 'pcs.',
             'unit': 'pcs.',
             'unitPrice': 300.0,
             'unitPrice': 300.0,
            'brand': undefined,
             'category': 'Pop|Metal',
             'category': 'Pop|Metal',
            'contents': undefined,
             'creative': 'metallica_promo_02',
             'creative': 'metallica_promo_02',
             'customerValue': 150.0,
             'customerValue': 150.0,
            'ean': undefined,
             'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
             'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
             'list': 'HomePage',
             'list': 'HomePage',
             'position': '2',
             'positioning': '2',
            'step': undefined,
             'variant': '2019.06.08 20:00|Slane Castle'
             'variant': '2019.06.08 20:00|Slane Castle'
         }
         }
Line 369: Line 283:
             'unit': 'pcs.',
             'unit': 'pcs.',
             'unitPrice': 300.0,
             'unitPrice': 300.0,
            'brand': undefined,
             'category': 'Pop|Metal',
             'category': 'Pop|Metal',
            'contents': undefined,
             'creative': 'also_bought_05',
             'creative': 'also_bought_05',
             'customerValue': 150.0,
             'customerValue': 150.0,
            'ean': undefined,
             'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
             'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '5',
             'positioning': '5',
             'step': 2,
             'step': 2,
             'variant': '2019.06.08 20:00|Slane Castle'
             'variant': '2019.06.08 20:00|Slane Castle'
Line 386: Line 297:


|}
|}


== Add to Cart (addToCart) ==
== Add to Cart (addToCart) ==
Line 423: Line 332:
| YES
| YES
| text
| text
| An unique ID that you have for the item, this can be your ID for the product, an SKU or a promotion ID.
| An unique ID that you have for the item, this can be your ID for the product (e.g. SKU)
|-
|-
! name
! name
Line 460: Line 369:
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 490: Line 399:
| The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
| The item's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
| The item's position in a list or collection (e.g. 2).
|-
|-
! step
! step
| NO
| NO
| integer
| integer
| If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 0 as the checkout initiation.
| If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 1 as the checkout initiation.
|-
|-
! variant
! variant
Line 505: Line 414:
| The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
| The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 525: Line 434:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'coupon': '43763436874',
             'coupon': '43763436874',
             'creative': 'product_page_promo_42',
             'creative': 'product_page_promo_42',
Line 531: Line 439:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'ProductPage',
             'list': 'ProductPage',
             'position': '3',
             'positioning': '3',
            'step': undefined,
             'variant': 'hardcover'
             'variant': 'hardcover'
         }
         }
Line 570: Line 477:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 585: Line 492:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'BasketPage',
             'list': 'BasketPage',
             'position': '3',
             'positioning': '3',
            'step': undefined,
             'variant': 'hardcover'
             'variant': 'hardcover'
         }
         }
Line 617: Line 523:
             'unit': 'pcs.',
             'unit': 'pcs.',
             'unitPrice': 300.0,
             'unitPrice': 300.0,
            'brand': undefined,
             'category': 'Pop|Metal',
             'category': 'Pop|Metal',
            'contents': undefined,
             'coupon': '43763436874',
             'coupon': '43763436874',
             'creative': 'product_page_promo_metallica',
             'creative': 'product_page_promo_metallica',
             'customerValue': 150.0,
             'customerValue': 150.0,
            'ean': undefined,
             'list': 'ProductPage',
             'list': 'ProductPage',
             'position': '3',
             'positioning': '3',
            'step': undefined,
             'variant': '2019.06.08 20:00|Slane Castle'
             'variant': '2019.06.08 20:00|Slane Castle'
         }
         }
Line 640: Line 542:
             'unit': 'pcs.',
             'unit': 'pcs.',
             'unitPrice': 900.0,
             'unitPrice': 900.0,
            'brand': undefined,
             'category': 'Festival',
             'category': 'Festival',
             'contents': [{
             'contents': [{
Line 651: Line 552:
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 400.0,
                 'unitPrice': 400.0,
                'brand': undefined,
                 'category': 'Pop|Metal',
                 'category': 'Pop|Metal',
                 'description': 'Early Bird',
                 'description': 'Early Bird',
                'ean': undefined,
                 'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
                 'imageUrl': "https://www.revolvermag.com/sites/default/files/styles/image_954_x_537/public/media/images/article/metallicapr.jpg",
                 'variant': '2019.06.08 20:00|Slane Castle'
                 'variant': '2019.06.08 20:00|Slane Castle'
Line 667: Line 566:
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 500,
                 'unitPrice': 500,
                'brand': undefined,
                 'category': 'Rap',
                 'category': 'Rap',
                 'description': 'Early Bird',
                 'description': 'Early Bird',
                'ean': undefined,
                 'imageUrl': 'https://cdn1.thr.com/sites/default/files/2012/08/snoop-dogg-pr-08-p.jpg',
                 'imageUrl': 'https://cdn1.thr.com/sites/default/files/2012/08/snoop-dogg-pr-08-p.jpg',
                 'variant': '2019.06.08 20:00|Slane Castle'
                 'variant': '2019.06.08 20:00|Slane Castle'
Line 677: Line 574:
             'creative': 'add_to_cart_promo_42',
             'creative': 'add_to_cart_promo_42',
             'customerValue': 150.0,
             'customerValue': 150.0,
            'ean': undefined,
             'list': 'BasketPage',
             'list': 'BasketPage',
             'position': '3',
             'positioning': '3',
            'step': undefined,
             'variant': '2019.06.08 20:00|Slane Castle'
             'variant': '2019.06.08 20:00|Slane Castle'
         }
         }
Line 696: Line 591:
         });
         });
|}
|}


== Initiate Checkout (initiateCheckout) ==
== Initiate Checkout (initiateCheckout) ==
Line 718: Line 611:
! description
! description
|-
|-
! contents
! [[#Special_properties|contents]]
| YES
| YES
| array
| array
Line 731: Line 624:
| YES
| YES
| float
| float
| The total revenue associated with the transaction in the given currency. This should include all costs the customer pays like shipping or tax.
| The total revenue associated with the transaction in the given currency. This is not include all costs the customer pays like shipping or any discount.
|-
|-
! step
! step
| YES
| YES
| integer
| integer
| In most cases, since this is the first checkout step, this should be 0.
| In most cases, since this is the first checkout step, this should be 1.
|-
|-
! contentType
! contentType
Line 763: Line 656:
| In most cases this should be 'Checkout'.
| In most cases this should be 'Checkout'.
|-
|-
! option
! opt
| NO
| NO
| text
| text
Line 773: Line 666:
| The unique ID of the purchase.
| The unique ID of the purchase.
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 793: Line 686:
| The tax associated with the purchase in the given currency.
| The tax associated with the purchase in the given currency.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 825: Line 718:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 837: Line 730:
             'currency': 'HUF',
             'currency': 'HUF',
             'revenue': 17500.0,
             'revenue': 17500.0,
             'step': 0,
             'step': 1,
             'contentType': 'Product',
             'contentType': 'Product',
             'coupon': '43763436874',
             'coupon': '43763436874',
Line 843: Line 736:
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'Checkout',
             'list': 'Checkout',
             'option': 'To postal office, no street address',
             'opt': 'To postal office, no street address',
             'orderNumber': '852',
             'orderNumber': '852',
             'position': '1',
             'positioning': '1',
             'shipping': 2500.0,
             'shipping': 2500.0,
             'shippingAddress': {
             'shippingAddress': {
Line 856: Line 749:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'tax': 0.0
             'tax': 0.0
Line 889: Line 782:
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 300.0,
                 'unitPrice': 300.0,
                'brand': undefined,
                 'category': 'Pop|Metal',
                 'category': 'Pop|Metal',
                 'description': 'Early Bird',
                 'description': 'Early Bird',
Line 905: Line 797:
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 500,
                 'unitPrice': 500,
                'brand': undefined,
                 'category': 'Rap',
                 'category': 'Rap',
                 'description': 'Early Bird',
                 'description': 'Early Bird',
Line 914: Line 805:
             'currency': 'GBP',
             'currency': 'GBP',
             'revenue': 2100.0,
             'revenue': 2100.0,
             'step': 0,
             'step': 1,
             'contentType': 'Product',
             'contentType': 'Product',
             'coupon': '43763436874',
             'coupon': '43763436874',
Line 920: Line 811:
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'Checkout',
             'list': 'Checkout',
             'option': 'To postal office, no street address',
             'opt': 'To postal office, no street address',
             'orderNumber': '852',
             'orderNumber': '852',
             'position': '1',
             'positioning': '1',
             'shipping': 2500.0,
             'shipping': 2500.0,
             'shippingAddress': {
             'shippingAddress': {
Line 933: Line 824:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'tax': 0.0
             'tax': 0.0
Line 951: Line 842:


|}
|}


== Initiate Purchase (initiatePurchase) ==
== Initiate Purchase (initiatePurchase) ==
Line 974: Line 864:
! description
! description
|-
|-
! contents
! [[#Special_properties|contents]]
| YES
| YES
| array
| array
Line 987: Line 877:
| YES
| YES
| float
| float
| The total revenue associated with the transaction in the given currency. This should include all costs the customer pays like shipping or tax.
| The total revenue associated with the transaction in the given currency. This should include all costs the customer pays like shipping, tax or any discount.
|-
|-
! step
! step
| YES
| YES
| integer
| integer
| In most cases, since this is the first checkout step, this should be 0.
| It is its sequential number in checkout process.
|-
|-
! contentType
! contentType
Line 1,019: Line 909:
| In most cases this should be 'Checkout'.
| In most cases this should be 'Checkout'.
|-
|-
! option
! opt
| NO
| NO
| text
| text
Line 1,029: Line 919:
| The unique ID of the purchase.
| The unique ID of the purchase.
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 1,049: Line 939:
| The tax associated with the purchase in the given currency.
| The tax associated with the purchase in the given currency.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 1,081: Line 971:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 1,099: Line 989:
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'Checkout',
             'list': 'Checkout',
             'option': 'To postal office, no street address',
             'opt': 'To postal office, no street address',
             'orderNumber': '852',
             'orderNumber': '852',
             'position': '1',
             'positioning': '1',
             'shipping': 2500.0,
             'shipping': 2500.0,
             'shippingAddress': {
             'shippingAddress': {
Line 1,112: Line 1,002:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'tax': 0.0
             'tax': 0.0
Line 1,145: Line 1,035:
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 300.0,
                 'unitPrice': 300.0,
                'brand': undefined,
                 'category': 'Pop|Metal',
                 'category': 'Pop|Metal',
                 'description': 'Early Bird',
                 'description': 'Early Bird',
Line 1,161: Line 1,050:
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 500,
                 'unitPrice': 500,
                'brand': undefined,
                 'category': 'Rap',
                 'category': 'Rap',
                 'description': 'Early Bird',
                 'description': 'Early Bird',
Line 1,176: Line 1,064:
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'Checkout',
             'list': 'Checkout',
             'option': 'To postal office, no street address',
             'opt': 'To postal office, no street address',
             'orderNumber': '852',
             'orderNumber': '852',
             'position': '1',
             'positioning': '1',
             'shipping': 2500.0,
             'shipping': 2500.0,
             'shippingAddress': {
             'shippingAddress': {
Line 1,189: Line 1,077:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'tax': 0.0
             'tax': 0.0
Line 1,207: Line 1,095:


|}
|}
= Full implementation =
This is the list of all events that are supported by Barion Pixel. Implementing these is currently not normally part of
contract terms, but supplying these will improve our service to your site, as we will receive more and better data about
your users. This will improve our capability to provide our services, especially in connection to your market and your
users.


== Set User Properties (setUserProperties) ==
== Set User Properties (setUserProperties) ==
Line 1,273: Line 1,151:
| The country that the user lives in, preferably in the ISO 3166-1 alpha-2 format, eg. HU or CZ.
| The country that the user lives in, preferably in the ISO 3166-1 alpha-2 format, eg. HU or CZ.
|-
|-
! county
! region
| NO
| NO
| NO
| NO
| text
| text
| The county that the user lives in, preferably in the ISO 3166-2 format, eg. HU-BU.
| The region that the user lives in, preferably in the ISO 3166-2 format, eg. HU-BU.
|-
|-
! currency
! currency
Line 1,303: Line 1,181:
| | The interests of the user, separated with the pipe character, eg. "Arts|Games".
| | The interests of the user, separated with the pipe character, eg. "Arts|Games".
|-
|-
! language
! lang
| NO
| NO
| NO
| NO
Line 1,333: Line 1,211:
| The ZIP code
| The ZIP code
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 1,348: Line 1,226:
             'city': 'Budapest',
             'city': 'Budapest',
             'country': 'HU',
             'country': 'HU',
             'county': 'HU-BU',
             'region': 'HU-BU',
             'currency': 'HUF',
             'currency': 'HUF',
             'email': '[email protected]',
             'email': '[email protected]',
             'gender': 'male',
             'gender': 'male',
             'interests': 'Arts|Crafts',
             'interests': 'Arts|Crafts',
             'language': 'hu',
             'lang': 'hu',
             'phone': '+36 1 111 1111',
             'phone': '+36 1 111 1111',
             'shippingAddress': {
             'shippingAddress': {
Line 1,364: Line 1,242:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'step': 1,
             'step': 1,
Line 1,414: Line 1,292:
| YES
| YES
| text
| text
| Full name of the category.
| Full name of the category. (eg. 'shoes')
|-
|-
! brand
! brand
Line 1,424: Line 1,302:
| NO
| NO
| text
| text
| | The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the category that was clicked.
| | The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|winter|shoes' or 'clothes|summer|shoes', separate levels with '|') of the category that was clicked.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 1,434: Line 1,312:
| NO
| NO
| text
| text
| Usually this value should be "Page".
| Usually this value should be "Product".
|-
|-
! customerValue
! customerValue
Line 1,446: Line 1,324:
| The collection that the category clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The collection that the category clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 1,456: Line 1,334:
| A number that represents the progress in the checkout process.
| A number that represents the progress in the checkout process.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 1,468: Line 1,346:
             'id': 'books_scifi',
             'id': 'books_scifi',
             'name': 'Sci-Fi Books',
             'name': 'Sci-Fi Books',
            'brand': undefined,
             'category': 'Books',
             'category': 'Books',
            'contents': undefined,
             'contentType': 'Page',
             'contentType': 'Page',
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'SearchPage',
             'list': 'SearchPage',
             'position': '42',
             'positioning': '42'
            'step': undefined
         }
         }


Line 1,500: Line 1,375:
* Why do we need this: Users demonstrate interest in your items by clicking them
* Why do we need this: Users demonstrate interest in your items by clicking them


This event should be fired each time when a user selects any of your items. This could be for example on a product
This event should be fired each time when a user selects any of your items and then the item's page will be loaded. This could be for example on a product
selection page, a result on a search or filter page, an item on a promotion. The page type on which the button is on
selection page, a result on a search or filter page, an item on a promotion. The page type on which the button is on
should be specified in the 'list' property. In case of product bundles, you can use the 'contents' property to list each
should be specified in the 'list' property. In case of product bundles, you can use the 'contents' property to list each
Line 1,561: Line 1,436:
| The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
| The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 1,586: Line 1,461:
| The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 1,594: Line 1,469:
| NO
| NO
| integer
| integer
| A number that represents the progress in the checkout process. Usually at a click product event, this is 0.
| A number that represents the progress in the checkout process when item is clicked through checkout.
|-
|-
! variant
! variant
| NO
| NO
| text
| text
| The variant of the product (e.g. 'black') clicked.
| The variant of the product (e.g. 'black<nowiki>|</nowiki>XS') clicked.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 1,620: Line 1,495:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'creative': 'book_42',
             'creative': 'book_42',
             'customerValue': 150.0,
             'customerValue': 150.0,
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'step': 2,
             'step': 2,
             'variant': 'hardcover'
             'variant': 'hardcover'
Line 1,664: Line 1,538:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 1,678: Line 1,552:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'step': 2,
             'step': 2,
             'variant': 'hardcover'
             'variant': 'hardcover'
Line 1,696: Line 1,570:


|}
|}


== Click Product Detail (clickProductDetail) ==
== Click Product Detail (clickProductDetail) ==
Line 1,747: Line 1,620:
| Price of one unit (that you provided) of the item clicked (in the currency that you provided).
| Price of one unit (that you provided) of the item clicked (in the currency that you provided).
|-
|-
! variant
! brand
| NO
| NO
| text
| text
| The variant of the product (e.g. 'black') clicked.
| Brand of the item clicked.
|-
! brand
| NO
| text
| Brand of the item clicked.
|-
|-
! category
! category
Line 1,762: Line 1,630:
| The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
| The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 1,787: Line 1,655:
| The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 1,795: Line 1,663:
| NO
| NO
| integer
| integer
| A number that represents the progress in the checkout process. Usually at a click product event, this is 0.
| A number that represents the progress in the checkout process.
|-
|-
! quantity
! quantity
Line 1,805: Line 1,673:
| NO
| NO
| text
| text
| The variant of the product (e.g. 'black') clicked.
| The variant of the product (e.g. 'black<nowiki>|</nowiki>XS') clicked.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 1,825: Line 1,693:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'creative': 'book_42',
             'creative': 'book_42',
             'customerValue': 150.0,
             'customerValue': 150.0,
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'step': 2,
             'step': 2,
             'quantity': 1.0,
             'quantity': 1.0,
Line 1,869: Line 1,736:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 1,883: Line 1,750:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'step': 2,
             'step': 2,
             'quantity': 1.0,
             'quantity': 1.0,
Line 1,902: Line 1,769:


|}
|}


== Customize Product (customizeProduct) ==
== Customize Product (customizeProduct) ==
Line 1,911: Line 1,777:


This event should fire on a button click that can be either a webpage or an asynchronous request for a different variant
This event should fire on a button click that can be either a webpage or an asynchronous request for a different variant
of an item, for example color, size etc. It should be implemented at any button that results in a different variant
of an item. It should be implemented at any button that allow customers to suit items for their needs before adding to cart, e.g. in colour or size.
being shown.




Line 1,957: Line 1,822:
| YES
| YES
| text
| text
| The variant of the product (e.g. 'black') clicked.
| The variant of the product (e.g. 'black<nowiki>|</nowiki>XS') clicked.
|-
|-
! brand
! brand
Line 1,969: Line 1,834:
| The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
| The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 1,994: Line 1,859:
| The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 2,007: Line 1,872:
| NO
| NO
| integer
| integer
| A number that represents the progress in the checkout process. Usually at a click product event, this is 0.
| A number that represents the progress in the checkout process.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 2,028: Line 1,893:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'creative': 'book_42',
             'creative': 'book_42',
             'customerValue': 150.0,
             'customerValue': 150.0,
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'step': 2,
             'step': 2,
             'quantity': 1.0,
             'quantity': 1.0,
Line 2,072: Line 1,936:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 2,086: Line 1,950:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'step': 2,
             'step': 2,
             'quantity': 1.0,
             'quantity': 1.0,
Line 2,104: Line 1,968:


|}
|}


== Purchase (purchase) ==
== Purchase (purchase) ==
Line 2,111: Line 1,973:
* Firing event: ''Page load'' after the payment process
* Firing event: ''Page load'' after the payment process
* User intent: Verify the completion of the transaction
* User intent: Verify the completion of the transaction
* Why do we need this: Users usually are put off by adverts of an item they already purchased, but can be receptive to related products
* Why do we need this: Users usually are put off by adverts of an item they already purchased, but can be receptive to related products. Avoiding irrelevant ads


This event should be fired on the page load where the user is notified about the completion of their transaction. This
This event should be fired on the page load where the user is notified about the completion of their transaction that is finished by successful payment. If the user chooses cash as the method of payment, usually this event should be fired when the ‘thank you’ page is loaded, if they choose online payment it should be fired when the ‘successful payment’ page is loaded. If the payment wasn't successful, then still this event still needs to be fired, except the 'step' property should set to a '-1' value.
is usually a 'thank you' page, that thanks the user for their purchase and verifies that the payment was successful. If
the payment wasn't successful, then still this is the event that needs to be fire, except the 'step' property should be
given a '-1' value.




Line 2,127: Line 1,986:
! description
! description
|-
|-
! contents
! [[#Special_properties|contents]]
| YES
| YES
| array
| array
Line 2,172: Line 2,031:
| In most cases this should be 'Checkout'.
| In most cases this should be 'Checkout'.
|-
|-
! option
! opt
| NO
| NO
| text
| text
Line 2,182: Line 2,041:
| The unique ID of the purchase.
| The unique ID of the purchase.
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 2,202: Line 2,061:
| The tax associated with the purchase in the given currency.
| The tax associated with the purchase in the given currency.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 2,233: Line 2,092:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 2,251: Line 2,110:
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'Checkout',
             'list': 'Checkout',
             'option': 'To postal office, no street address',
             'opt': 'To postal office, no street address',
             'orderNumber': '852',
             'orderNumber': '852',
             'position': '1',
             'positioning': '1',
             'shipping': 2500.0,
             'shipping': 2500.0,
             'shippingAddress': {
             'shippingAddress': {
Line 2,264: Line 2,123:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'tax': 0.0
             'tax': 0.0
Line 2,272: Line 2,131:


|}
|}


== Remove from Cart (removeFromCart) ==
== Remove from Cart (removeFromCart) ==
Line 2,344: Line 2,201:
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 2,374: Line 2,231:
| The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 2,382: Line 2,239:
| NO
| NO
| integer
| integer
| If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 0 as the checkout initiation.
| If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 1 as the checkout initiation.
|-
|-
! variant
! variant
Line 2,389: Line 2,246:
| The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
| The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 2,409: Line 2,266:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'coupon': '43763436874',
             'coupon': '43763436874',
             'creative': 'upsell_promo_42',
             'creative': 'upsell_promo_42',
Line 2,415: Line 2,271:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'BasketPage',
             'list': 'BasketPage',
             'position': '3',
             'positioning': '3',
            'step': undefined,
             'variant': 'hardcover'
             'variant': 'hardcover'
         }
         }
Line 2,454: Line 2,309:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 2,469: Line 2,324:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'BasketPage',
             'list': 'BasketPage',
             'position': '3',
             'positioning': '3',
            'step': undefined,
             'variant': 'hardcover'
             'variant': 'hardcover'
         }
         }
Line 2,508: Line 2,362:
! description
! description
|-
|-
! contents
! [[#Special_properties|contents]]
| YES
| YES
| array
| array
Line 2,553: Line 2,407:
| In most cases this should be 'Checkout'.
| In most cases this should be 'Checkout'.
|-
|-
! option
! opt
| NO
| NO
| text
| text
Line 2,563: Line 2,417:
| The unique ID of the purchase.
| The unique ID of the purchase.
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 2,588: Line 2,442:
| The tax associated with the purchase in the given currency.
| The tax associated with the purchase in the given currency.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 2,620: Line 2,474:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 2,631: Line 2,485:
                 }],
                 }],
             'paymentMethod': 'Barion',
             'paymentMethod': 'Barion',
             'step': 0,
             'step': 1,
             'contentType': 'Product',
             'contentType': 'Product',
             'coupon': '43763436874',
             'coupon': '43763436874',
Line 2,638: Line 2,492:
             'customerValue': 150.0,
             'customerValue': 150.0,
             'list': 'Checkout',
             'list': 'Checkout',
             'option': 'To postal office, no street address',
             'opt': 'To postal office, no street address',
             'orderNumber': '852',
             'orderNumber': '852',
             'position': '1',
             'positioning': '1',
             'revenue': 17500.0,
             'revenue': 17500.0,
             'shipping': 2500.0,
             'shipping': 2500.0,
Line 2,652: Line 2,506:
                 'street': 'Műegyetem rkpt. 3.',
                 'street': 'Műegyetem rkpt. 3.',
                 'street2': '2. porta',
                 'street2': '2. porta',
                 'zip': '1111'
                 'zipCode': '1111'
             },
             },
             'tax': 0.0
             'tax': 0.0
Line 2,673: Line 2,527:
== Click Promo (clickPromo) ==
== Click Promo (clickPromo) ==


* Firing event: ''Button click'' on a promotion box
* Firing event: ''Button click'' on a promotion box only on your site.
* User intent: View a promotion
* User intent: View a promotion
* Why do we need this: Users demonstrate interest in your promotion offers by clicking them
* Why do we need this: Users demonstrate interest in your promotion offers by clicking them


This event should be fired when one of your users selects a promotion. Promotions can be usually placed on home pages,
This event should be fired when one of your users selects a promotion on your site. Promotions can be usually placed on home pages,
product places, in the checkout process and many other places. The promotion can be about a product, offer, brand or any
product places, in the checkout process and many other places. The promotion can be about a product, offer, brand or any
other single offer or grouping of offers.
other single offer or grouping of offers. This event should be implemented only on promotions that you serve on your page natively,
as opposed to those served dynamically by external third party services such as Google Ads.




Line 2,720: Line 2,575:
| | The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item in the promotion clicked.
| | The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item in the promotion clicked.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 2,745: Line 2,600:
| The collection that the promotion clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
| The collection that the promotion clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
|-
|-
! position
! positioning
| NO
| NO
| text
| text
Line 2,758: Line 2,613:
| NO
| NO
| integer
| integer
| A number that represents the progress in the checkout process. Usually at a click product event, this is 0.
| A number that represents the progress in the checkout process.
|-
|-
! unit
! unit
Line 2,773: Line 2,628:
| NO
| NO
| text
| text
| The variant of the product (e.g. 'black') promoted.
| The variant of the product (e.g. 'black|XS') promoted.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 2,791: Line 2,646:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'currency': 'HUF',
             'currency': 'HUF',
             'customerValue': 150.0,
             'customerValue': 150.0,
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'quantity': 1.0,
             'quantity': 1.0,
             'step': 2,
             'step': 2,
Line 2,835: Line 2,689:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 2,849: Line 2,703:
             'ean': '9780575115347',
             'ean': '9780575115347',
             'list': 'Checkout',
             'list': 'Checkout',
             'position': '1',
             'positioning': '1',
             'quantity': 1.0,
             'quantity': 1.0,
             'step': 2,
             'step': 2,
Line 2,879: Line 2,733:
* Why do we need this: Users demonstrate interest in your market area by signing up for an account
* Why do we need this: Users demonstrate interest in your market area by signing up for an account


This event should be usually sent along the set user properties event, since this event only captures the actual signup,
This event should be usually sent along the set user properties event in registration process, since this event only captures the actual signup,
not the user itself. This event should both be fired if a user registers for an account or subscription for the first
not the user itself. This event should both be fired if a user registers for an account or subscription for the first
time and when they login afterwards. Unsuccessful login or signup events should cause error events to be sent. If
time and when they login afterwards. Unsuccessful login or signup events should cause error events to be sent. If
Line 2,887: Line 2,741:




'''Add to cart event properties'''
'''Sign up event properties'''
{| class="wikitable"
{| class="wikitable"
! key
! key
Line 2,919: Line 2,773:
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
| | The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 2,954: Line 2,808:
| THehvariant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
| THehvariant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 2,969: Line 2,823:
             'brand': 'Gollancz',
             'brand': 'Gollancz',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
             'category': 'books|hardcover|scifi, books|hardcover|comedy',
            'contents': undefined,
             'currency': 'HUF',
             'currency': 'HUF',
             'customerValue': 150.0,
             'customerValue': 150.0,
Line 2,976: Line 2,829:
             'unitPrice': 4990.0,
             'unitPrice': 4990.0,
             'variant': 'hardcover'
             'variant': 'hardcover'
        }
        // Use one of these to add the event listener to the button click (use only one):
        // vanilla JS (if you don't use jQuery, if in your console "$" is not defined on your site)
        document.getElementById('signup_button').addEventListener('click', function() {
            bp('track', 'signUp', signUpProperties);
        });
        // jQuery (if you use jQuery, if in your console "$" is defined on your site)
        $("#signup_button").click(function() {
            bp('track', 'signUp', signUpProperties);
        });
|}
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"
| <strong> Registration </strong>
|-
|  // sample subscription data
        var signUpProperties = {
            'contentType': 'Page',
            'id': 'registration_form_1',
            'name': 'Registration'
         }
         }


Line 3,022: Line 2,900:
| The search terms entered by the user or the HTTP property that contains the search terms.
| The search terms entered by the user or the HTTP property that contains the search terms.
|-
|-
! contents
! [[#Special_properties|contents]]
| NO
| NO
| array
| array
Line 3,057: Line 2,935:
| The number of the search or filter results.
| The number of the search or filter results.
|}
|}
 
<span style="font-size:80%; line-height: 1.31em;">(*It's possible to add [[#Special_properties|custom property]])</span>




Line 3,090: Line 2,968:
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                 'quantity': 3.0,
                 'quantity': 3.0,
                 'totalItemPrice': 25.935,
                 'totalItemPrice': 25935,
                 'unit': 'pcs',
                 'unit': 'pcs',
                 'unitPrice': 8.645,
                 'unitPrice': 8645,
                 'brand': 'Gollancz',
                 'brand': 'Gollancz',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
                 'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 3,101: Line 2,979:
                 }],
                 }],
             'contentType': 'Product',
             'contentType': 'Product',
            'currency': undefined,
             'customerValue': 150.0,
             'customerValue': 150.0,
             'id': 'search_01',
             'id': 'search_01',
Line 3,183: Line 3,060:




'''Error event properties'''
'''Custom event properties'''
{| class="wikitable"
{| class="wikitable"
! key
! key
Line 3,190: Line 3,067:
! description
! description
|-
|-
! eventAction
! _eventAction
| NO
| NO
| text
| text
| The action that the user takes, eg. click.
| The action that the user takes, eg. click.
|-
|-
! eventCategory
! _eventCategory
| NO
| NO
| text
| text
| The category that the event falls in, you can define it for yourself, eg. 'user_settings'.
| The category that the event falls in, you can define it for yourself, eg. 'user_settings'.
|-
|-
! eventLabel
! _eventLabel
| NO
| NO
| text
| text
| The label associated with the event, eg. 'language_selection'.
| The label associated with the event, eg. 'language_selection'.
|-
|-
! eventProperty
! _eventProperty
| NO
| NO
| text
| text
| The property associated with the event, eg. 'unit_format'.
| The property associated with the event, eg. 'unit_format'.
|-
|-
! eventValue
! _eventValue
| NO
| NO
| text
| text
| The value of the property associated with the event, eg. 'metric'.
| The value of the property associated with the event, eg. 'Inch'.
|}
|}


Line 3,224: Line 3,101:
|      // for measuring unit selection
|      // for measuring unit selection
         var customEventProperties = {
         var customEventProperties = {
             'eventAction': 'click',
             '_eventAction': 'click',
             'eventCategory': 'user_settings',
             '_eventCategory': 'user_settings',
             'eventLabel': 'language_selection',
             '_eventLabel': 'language_selection',
             'eventProperty': 'unit_format',
             '_eventProperty': 'unit_format',
             'eventValue': 'metric'
             '_eventValue': 'Inch'
         }
         }


Line 3,269: Line 3,146:
| YES
| YES
| text
| text
| An unique ID that you have for the offer, this can be your ID for the product, an SKU or a promotion ID.
| An unique ID that you have for the offer, this can be your ID for the product or SKU.
|-
|-
! name
! name
Line 3,376: Line 3,253:
| The address, continued.
| The address, continued.
|-
|-
! zip
! zipCode
| NO
| NO
| text
| text
| The zip code of the recipient address.
| The zip code of the recipient address.
|}  
|}




Line 3,390: Line 3,267:
! Description
! Description
|-
|-
| _custom  
| _custom
| any type
| any type
| If our predefined events and/or object properties don't suit your needs, you can include your own, custom events and/or properties. Custom properties can be used with standard events. Custom properties must start with an underscore.
| If our predefined events and/or object properties don't suit your needs, you can include your own, custom events and/or properties. Custom properties can be used with standard events. Custom properties must start with an underscore.
Line 3,424: Line 3,301:
                     'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                     'name': "Hitchhikers' Guide to the Galaxy, hardcover, ISBN: 9780575115347",
                     'quantity': 3.0,
                     'quantity': 3.0,
                     'totalItemPrice': 25.935,
                     'totalItemPrice': 25935,
                     'unit': 'pcs',
                     'unit': 'pcs',
                     'unitPrice': 8.645,
                     'unitPrice': 8645,
                     'brand': 'Gollancz',
                     'brand': 'Gollancz',
                     'category': 'books|hardcover|scifi, books|hardcover|comedy',
                     'category': 'books|hardcover|scifi, books|hardcover|comedy',
Line 3,442: Line 3,319:
                 'customerValue': 150.0,
                 'customerValue': 150.0,
                 'list': 'Checkout',
                 'list': 'Checkout',
                 'option': 'To postal office, no street address',
                 'opt': 'To postal office, no street address',
                 'orderNumber': '852',
                 'orderNumber': '852',
                 'position': '1',
                 'positioning': '1',
                 'shipping': 2500.0,
                 'shipping': 2500.0,
                 'shippingAddress': {
                 'shippingAddress': {
Line 3,455: Line 3,332:
                     'street': 'Műegyetem rkpt. 3.',
                     'street': 'Műegyetem rkpt. 3.',
                     'street2': '2. porta',
                     'street2': '2. porta',
                     'zip': '1111'
                     'zipCode': '1111'
                 },
                 },
                 'tax': 0.0,
                 'tax': 0.0,
                 '_myCustomProperty' : 'This is my first custom property'
                 '_myCustomProperty' : 'This is my first custom property'
             }
             }
           
 
             bp('track', 'purchase', purchaseProperties);
             bp('track', 'purchase', purchaseProperties);


|}
|}
= Implementing the base code in the Google Tag Manager =
<gallery mode="slideshow" widths=200px heights=200px>
Image:Datamongtm-1.png|GTM screen
Image:Datamongtm-2.png|Click on Tags in Current Workspace on the left side
Image:Datamongtm-3.png|Click on New on the screen that appears
Image:Datamongtm-4.png|Name the tag as you like, for example to "Barion Pixel - Base Code"
Image:Datamongtm-5.png|Click into the "Choose a tag" box
Image:Datamongtm-6.png|Choose "Custom HTML" in the dropdown
Image:Datamongtm-7.png|Paste the Base Code into the HTML box
Image:Datamongtm-8.png|Put your own Pixel ID into both places
Image:Datamongtm-9.png|Verify that you have put your own Pixel ID into both places
Image:Datamongtm-10.png|Click into the "Triggering" box
Image:Datamongtm-11.png|Choose "All Pages" from the list
Image:Datamongtm-12.png|Verify triggering on all pages and your Pixel ID in both places, then click "Save"
Image:Datamongtm-13.png|The new tag shoud appear in the Tags list
</gallery>

Latest revision as of 10:32, 6 March 2024

Barion Pixel API reference

Consent (grantConsent, rejectConsent)

  • User intent: Give or reject Barion Pixel consent
  • To be implemented at: Inside your own consent management software
  • Why do we need this: Participation of webshop clients is entirely consent based complying with the GDPR

Consent events determine which of the sent data can be used by us for marketing purposes. Two consent events can be used to control user consent. The "grantConsent" event has to be sent when the visitor accepts the cookie policy that expressly allows Barion to use data for marketing purposes. Sending this event must be handled by your own consent management implementation that you are responsible for as outlined in our terms. The "rejectConsent" event should be sent when the customer rejects the cookie policy that includes Barion Pixel functionality. It should be noted that rejecting Barion marketing consent does not mean that no data should be sent towards Barion, as Barion has a legitimate interest using this data for fraud management. Rejecting Barion consent however means that the data from that session will not be used for marketing purposes at all, despite receiving it. All consent events are sent by calling the Pixel's consent function as shown below. Usage of a fully compliant consent management platform (CMP) is strongly recommended by Barion. You can find our recommendation here


Consent event implementation example

   
        bp('consent', 'grantConsent');
        bp('consent', 'rejectConsent');
    

Encrypting personal data (setEncryptedEmail, setEncryptedPhone)

  • Firing event: On click or per pageview when email / phone number is globally or occasionally available for the given user.
  • User intent: User types in their email (or phone number) for any reason, such as signing in, within checkout when placing an order, signig up for newsletter, etc.
  • Why do we need this: More accurate data collection after third party cookie phase out in compliance with GDPR.

We do not collect unencrypted personally identifiable information (PII). All PII data is encrypted by the SHA-1 algorithm that hides the real, human readable email address and phone number. The encryption process will always happen on Barion side whenever an unencrypted email address (or phone number) is being sent but it is also possible to send a previously SHA-1 encrypted email address (or phone number). Sending an empty string, invalid email address (or phone number) or a not properly hashed value will result in an error message. Please send email with lowercase letter and the phone number as customer type in.


setEncryptedEmail / setEncryptedPhone implementation example

   
        bp('identity','setEncryptedEmail', '[email protected]');
        bp('identity','setEncryptedPhone', '+36301234567');
    

OR

   
        var hashedEmailAddress = sha1('[email protected]');
        bp('identity','setEncryptedEmail', hashedEmailAddress);

        var hashedPhone = sha1('+36301234567');
        bp('identity','setEncryptedPhone', hashedPhone);

    

Content View (contentView)

  • Firing event: Page load of item pages minimally, preferably on all pages that refers to a single item or other information.
  • User intent: View the page that shows a single offer described exclusively or retrieve any information about something.
  • Why do we need this: Offer descriptions help us know more about your offers and ecommerce behaviour.


This event should be fired when one of your users visit a page that refers to one of your items that can be bought or users read other information about something that is not connected to an item directly (e.g.: news, description, articles, blog posts etc.). Except product page, in most cases the page title is adequate for name property.


Content view event properties

key required type description
contentType YES text If this is a product page as per minimal requirements, this value should be "Product". Otherwise select a value that best fits from these: Page/Product/Article/Promotion/Banner/Misc.
currency YES (in case of "Product") text (ISO 4217) The currency that the product price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
id YES text An unique ID that you have for the offer, this can be your ID for the product, an SKU or a promotion ID.
name YES text The full name that you have for the offer, for example a product name (eg. Red Bull 24pcs carton) in product page, otherwise in most cases page title is adequate. Please note that item names should be consistent in all events.
quantity YES (in case of "Product") float The quantity of the product offered as initially given on the page.
unit YES (in case of "Product") text The unit that your offer is measured in (eg. pieces, kg, m).
unitPrice YES (in case of "Product") float The price of one measurement of your offer in the given currency.
brand NO text The brand of the offer.
category NO text The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the offer.
contents NO array An array of JS objects for detailing multiple items of the offer. For more details see the table below.
creative NO text The name or description of the promotion, for example a promotion picture filename or slogan.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
ean NO text Contains the International Article Number (EAN) of the offer if available.
imageUrl NO text The URL of the image of the viewed item.
list NO text The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The product's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
step NO integer If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 1 as the checkout initiation.
variant NO text The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)

(*It's possible to add custom property)


Content view event implementation examples:

Add to Cart (addToCart)

  • Firing event: Button click that results in a product to be selected for purchase
  • User intent: Select product for purchase
  • Why do we need this: Users demonstrate strong interest in your items by selecting them for purchase

The add to cart event is, as its name suggests, connected to a user "adding a product to their cart". Usually this means that a user decide to purchase a product or service, and has added this item to their cart. Even if your website does not use carts in the literal sense, there is a point in a user session where the given user decides that they intend to purchase the product. This exact intent is what we want to capture here, so the button click which best matches the point of this intent, such as one labeled 'Buy' or 'Reserve' should be the one to attach this event to.


Add to cart event properties

key required type description
contentType YES text Usually, this value should be "Product".
currency YES text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
id YES text An unique ID that you have for the item, this can be your ID for the product (e.g. SKU)
name YES text The full name that you have for the added item, for example a product name (eg. Red Bull 24pcs carton).
quantity YES float The quantity of the item added to the cart.
totalItemPrice YES float The total price of the added items in the given currency.
unit YES text The unit that your item is measured in (eg. pieces, kg, hours).
unitPrice YES float The price of one measurement of your item in the given currency.
brand NO text The brand of the item.
category NO text The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
contents NO array An array of JS objects for detailing multiple items of the item. For more details see the table below.
coupon NO text The coupon code that was used when the item was added to cart.
creative NO text The name or description of the promotion for the item, for example a promotion picture filename or slogan of the promotion that adds the items to the cart automatically.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
ean NO text Contains the International Article Number (EAN) of the offer if available.
list NO text The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The item's position in a list or collection (e.g. 2).
step NO integer If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 1 as the checkout initiation.
variant NO text The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)

(*It's possible to add custom property)


Add to cart event implementation examples:

Initiate Checkout (initiateCheckout)

  • Firing event: Button click that starts the checkout process
  • User intent: Purchase the items in the cart
  • Why do we need this: Users usually are put off by adverts of an item they already purchased, but can be receptive to related products

Usually on a webshop, there is a checkout process that starts with clicking a button with items in your cart. This button click is the one that this event should be attached to. After this click, typically the user has to provide other data, such as a shipping address and method, and confirm the purchase (which should fire the initiate purchase event).


Initiate checkout event properties

key required type description
contents YES array An array of JS objects for detailing the actual items contained in the cart, meaning the shipping and coupons should be excluded. For the detailed format see the table below.
currency YES text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
revenue YES float The total revenue associated with the transaction in the given currency. This is not include all costs the customer pays like shipping or any discount.
step YES integer In most cases, since this is the first checkout step, this should be 1.
contentType NO text Usually this value should be "Product".
coupon NO text The coupon code that is being used.
creative NO text The name or description of the promotion for the cart, for example a promotion picture filename or slogan of the promotion that starts the checkout automatically.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
list NO text In most cases this should be 'Checkout'.
opt NO text Additional information about the purchase.
orderNumber NO text The unique ID of the purchase.
positioning NO text The item's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
shipping NO float The price of shipping associated with the purchase in the given currency.
shippingAddress NO object The shipping address given in the format detailed below.
tax NO float The tax associated with the purchase in the given currency.

(*It's possible to add custom property)


Initiate checkout event implementation examples:

Initiate Purchase (initiatePurchase)

  • Firing event: Button click that completes the checkout process
  • User intent: Pay for the items in the cart
  • Why do we need this: Users usually are put off by adverts of an item they already purchased, but can be receptive to related products

This event should be fired at the same time as the user is redirected to a payment solution's own website, for example when the user is sent to the Barion Smart Gateway for payment. It should also be fired if the user chose a non-payment checkout option, for example payment on receipt, but the transaction is considered complete. This should be the last confirmation of the checkout process, after which the sale is considered to have taken place. Ideally after pressing this button the user should reach either a 'payment pending' then a 'thank you' page, or simply the 'thank you' page.


Initiate purchase event properties

key required type description
contents YES array An array of JS objects for detailing the actual items contained in the cart, meaning the shipping and coupons should be excluded. For the detailed format see the table below.
currency YES text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
revenue YES float The total revenue associated with the transaction in the given currency. This should include all costs the customer pays like shipping, tax or any discount.
step YES integer It is its sequential number in checkout process.
contentType NO text Usually this value should be "Product".
coupon NO text The coupon code that is being used.
creative NO text The name or description of the promotion for the cart, for example a promotion picture filename or slogan of the promotion that starts the checkout automatically.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
list NO text In most cases this should be 'Checkout'.
opt NO text Additional information about the purchase.
orderNumber NO text The unique ID of the purchase.
positioning NO text The item's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
shipping NO float The price of shipping associated with the purchase in the given currency.
shippingAddress NO object The shipping address given in the format detailed below.
tax NO float The tax associated with the purchase in the given currency.

(*It's possible to add custom property)


Initiate purchase event implementation examples:

Set User Properties (setUserProperties)

  • Firing event: Button click when user properties are available
  • User intent: Provide personal details
  • Why do we need this: Information about users helps us give more relevant offers to them

This event should be attached to any browser event that when fired, can access user information. We handle all user information in accordance with the GDPR and as such, all personally identifying information is hashed directly on the client side, in the JS code, before being forwarded to us, which makes it impossible to read it on our side. This makes it very important to fill out the properties provided below correctly, so that all PII falls in the correct fields that will be hashed before sending. The pages that this event can be inserted into are mostly sign up or sign in pages, newsletter subscription pages, and any other page where the user can provide information about themselves. This event can also be sent during the checkout process.


Set user properties event properties

key required hashed type description
userId YES YES text Your ID for the user, for example an username, email or internal ID that you identify the user with on your site.
accountCreatedTime NO NO UNIX timestamp The time that the user account had been created, in a UNIX timestamp that is seconds accurate.
age NO NO text The age of the user.
city NO NO text The city that the user lives in.
country NO NO text The country that the user lives in, preferably in the ISO 3166-1 alpha-2 format, eg. HU or CZ.
region NO NO text The region that the user lives in, preferably in the ISO 3166-2 format, eg. HU-BU.
currency NO NO text Currency that the user prefers, or the one that the prices are displayed to them in. 3 digit ISO 4217 format is preferred (eg. HUF, EUR).
email NO YES text The email that belongs to the user.
gender NO NO text The gender of the user.
interests NO NO text The interests of the user, separated with the pipe character, eg. "Arts|Games".
lang NO NO text The language of the user, preferably in the ISO 639-1 format, eg. hu or cz.
phone NO YES text Phone number of the user, preferably in the E.164 format, eg. +36 1 111 1111
shippingAddress NO NO object The address of the user in the format described below.
step NO NO text If the user properties are set in the checkout process, the checkout process step.
zipCode NO NO text The ZIP code

(*It's possible to add custom property)


Set user properties event implementation examples:


Category Selection (categorySelection)

  • Firing event: Button click on a category on a category selection page
  • User intent: View a category
  • Why do we need this: Users demonstrate interest in items belonging to a category by looking at the category

This event should be implemented where the user can select a category of events on a page, for example a brand, a common property, a theme, a price range or any grouping of product along something that makes them belong to the category.


Category selection event properties

key required type description
id YES text Unique ID of the category clicked on your site.
name YES text Full name of the category. (eg. 'shoes')
brand NO text Brand of the item in the category clicked.
category NO text The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|winter|shoes' or 'clothes|summer|shoes', separate levels with '|') of the category that was clicked.
contents NO array An array of JS objects for detailing items in the category. For more details see the table below.
contentType NO text Usually this value should be "Product".
customerValue NO float The value of a user performing this event to the business.
list NO text The collection that the category clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The category's position in the list or collection (e.g. 2) or the position of the creative (e.g. banner_slot_1)
step NO integer A number that represents the progress in the checkout process.

(*It's possible to add custom property)


Category selection event implementation examples:


Click Product (clickProduct)

  • Firing event: Button click on an item
  • User intent: View an item
  • Why do we need this: Users demonstrate interest in your items by clicking them

This event should be fired each time when a user selects any of your items and then the item's page will be loaded. This could be for example on a product selection page, a result on a search or filter page, an item on a promotion. The page type on which the button is on should be specified in the 'list' property. In case of product bundles, you can use the 'contents' property to list each item in the bundle, while the direct properties should refer to the bundle as a whole as an item.



Click product event properties

key required type description
contentType YES text The type of the content of the page where the item was selected. Possible values (only these are accepted): Page/Product/Article/Promotion/Banner/Misc.
currency YES text (ISO 4217) Currency that the item is listed in for purchase. 3 digit ISO 4217 format is preferred (eg. HUF, EUR).
id YES text Unique ID of the item clicked on your site.
name YES text Full name of the item clicked.
quantity YES float The quantity of a product clicked measured in the unit provided (e.g. 2).
unit YES text The measurement unit of the item clicked. (e.g. pcs, kg).
unitPrice YES float Price of one unit (that you provided) of the item clicked (in the currency that you provided).
brand NO text Brand of the item clicked.
category NO text shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
contents NO array An array of JS objects for detailing multiple items clicked. For more details see the table below.
creative NO text The name or description of the promotion for the item, for example a promotion picture filename or slogan of the promotion that selects the item.
customerValue NO float The value of a user performing this event to the business.
ean NO text Contains the International Article Number (EAN) of the item if available.
list NO text The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The product's position in the list or collection (e.g. 2) or the position of the creative (e.g. banner_slot_1)
step NO integer A number that represents the progress in the checkout process when item is clicked through checkout.
variant NO text The variant of the product (e.g. 'black|XS') clicked.

(*It's possible to add custom property)


Click product event implementation examples:

Click Product Detail (clickProductDetail)

  • Firing event: Button click requesting extended details about an item
  • User intent: View extended information about an item
  • Why do we need this: Users demonstrate high interest in your items by looking up details about them

This event should fire on a button click that can be either a webpage or an asynchronous request for more details about an item. It should be implemented at any button that results in more details being shown about an item.


Click product detail event properties

key required type description
contentType YES text The type of the content of the page where the item was selected. Possible values (only these are accepted): Page/Product/Article/Promotion/Banner/Misc.
currency YES text (ISO 4217) Currency that the item is listed in for purchase. 3 digit ISO 4217 format is preferred (eg. HUF, EUR).
id YES text Unique ID of the item clicked on your site.
name YES text Full name of the item clicked.
unit YES text The measurement unit of the item clicked. (e.g. pcs, kg).
unitPrice YES float Price of one unit (that you provided) of the item clicked (in the currency that you provided).
brand NO text Brand of the item clicked.
category NO text shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
contents NO array An array of JS objects for detailing multiple items clicked. For more details see the table below.
creative NO text The name or description of the promotion for the item, for example a promotion picture filename or slogan of the promotion that selects the item.
customerValue NO float The value of a user performing this event to the business.
ean NO text Contains the International Article Number (EAN) of the item if available.
list NO text The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The product's position in the list or collection (e.g. 2) or the position of the creative (e.g. banner_slot_1)
step NO integer A number that represents the progress in the checkout process.
quantity NO float The quantity of a product clicked measured in the unit provided (e.g. 2).
variant NO text The variant of the product (e.g. 'black|XS') clicked.

(*It's possible to add custom property)


Click product detail event implementation examples:

Customize Product (customizeProduct)

  • Firing event: Button click changing particular characteristics of an item
  • User intent: Change characteristics of an item
  • Why do we need this: Users demonstrate interest in your items by customizing them

This event should fire on a button click that can be either a webpage or an asynchronous request for a different variant of an item. It should be implemented at any button that allow customers to suit items for their needs before adding to cart, e.g. in colour or size.


Customize product event properties

key required type description
contentType YES text The type of the content of the page where the item was selected. Possible values (only these are accepted): Page/Product/Article/Promotion/Banner/Misc.
currency YES text (ISO 4217) Currency that the item is listed in for purchase. 3 digit ISO 4217 format is preferred (eg. HUF, EUR).
id YES text Unique ID of the item clicked on your site.
name YES text Full name of the item clicked.
unit YES text The measurement unit of the item clicked. (e.g. pcs, kg).
unitPrice YES float Price of one unit (that you provided) of the item clicked (in the currency that you provided).
variant YES text The variant of the product (e.g. 'black|XS') clicked.
brand NO text Brand of the item clicked.
category NO text shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item clicked.
contents NO array An array of JS objects for detailing multiple items clicked. For more details see the table below.
creative NO text The name or description of the promotion for the item, for example a promotion picture filename or slogan of the promotion that selects the item.
customerValue NO float The value of a user performing this event to the business.
ean NO text Contains the International Article Number (EAN) of the item if available.
list NO text The collection that the product clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The product's position in the list or collection (e.g. 2) or the position of the creative (e.g. banner_slot_1)
quantity NO float The quantity of a product clicked measured in the unit provided (e.g. 2).
step NO integer A number that represents the progress in the checkout process.

(*It's possible to add custom property)


Customize product event implementation examples:

Purchase (purchase)

  • Firing event: Page load after the payment process
  • User intent: Verify the completion of the transaction
  • Why do we need this: Users usually are put off by adverts of an item they already purchased, but can be receptive to related products. Avoiding irrelevant ads

This event should be fired on the page load where the user is notified about the completion of their transaction that is finished by successful payment. If the user chooses cash as the method of payment, usually this event should be fired when the ‘thank you’ page is loaded, if they choose online payment it should be fired when the ‘successful payment’ page is loaded. If the payment wasn't successful, then still this event still needs to be fired, except the 'step' property should set to a '-1' value.


Purchase event properties

key required type description
contents YES array An array of JS objects for detailing the actual items contained in the cart, meaning the shipping and coupons should be excluded. For the detailed format see the table below.
currency YES text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
revenue YES float The total revenue associated with the transaction in the given currency. This should include all costs the customer pays like shipping or tax.
step YES integer In most cases, since this is after the last checkout step, this should be the maximum value that you use. If the transaction is unsuccessful, this should be -1.
contentType NO text Usually this value should be "Product".
coupon NO text The coupon code that is being used.
creative NO text The name or description of the promotion for the cart, for example a promotion picture filename or slogan of the promotion that starts the checkout automatically.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
list NO text In most cases this should be 'Checkout'.
opt NO text Additional information about the purchase.
orderNumber NO text The unique ID of the purchase.
positioning NO text The item's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
shipping NO float The price of shipping associated with the purchase in the given currency.
shippingAddress NO object The shipping address given in the format detailed below.
tax NO float The tax associated with the purchase in the given currency.

(*It's possible to add custom property)


Purchase event implementation example:

Remove from Cart (removeFromCart)

  • Firing event: Button click that results in a product to be removed from the items selected for purchase
  • User intent: Deselect product for purchase
  • Why do we need this: Users demonstrate interest in carted products, and this can be refined if we know when products are deselected

The remove from cart event is very similar to the add to cart event, and is mainly required to refine our data on selected items by informing us when products are taken out from the cart or deselected from purchase. It can also mean that a purchase process that first made a user select an item is simply cancelled.


Remove from cart event properties

key required type description
contentType YES text Usually, this value should be "Product".
currency YES text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
id YES text An unique ID that you have for the item, this can be your ID for the product, an SKU or a promotion ID.
name YES text The full name that you have for the added item, for example a product name (eg. Red Bull 24pcs carton).
quantity YES float The quantity of the item removed from the cart.
totalItemPrice YES float The total price of the removed items in the given currency.
unit YES text The unit that your item is measured in (eg. pieces, kg, hours).
unitPrice YES float The price of one measurement of your item in the given currency.
brand NO text The brand of the item.
category NO text The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
contents NO array An array of JS objects for detailing multiple items of the item. For more details see the table below.
coupon NO text The coupon code that was used when the item was removed from cart.
creative NO text Seldom used, for example a promotion that changes a product in your cart to a better, more expensive or more recent one.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
ean NO text Contains the International Article Number (EAN) of the item if available.
list NO text The function of the loaded page from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The item's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
step NO integer If the page is displayed along the checkout process, the checkout step number that the page is displayed in, numbered from 1 as the checkout initiation.
variant NO text The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)

(*It's possible to add custom property)


Remove from cart event implementation examples:


Add Payment Info (addPaymentInfo)

  • Firing event: Button click at a point in the checkout process where the payment method is already set
  • User intent: Select payment method
  • Why do we need this: It helps to identify user financial habits

This event should be fired when the payment method of a user is already entered. This event should be fired both if the payment info is explicitly requested and provided, but also if it is only implied for example when only one option is available.


Add payment info event properties

key required type description
contents YES array An array of JS objects for detailing the actual items contained in the cart, meaning the shipping and coupons should be excluded. For the detailed format see the table below.
paymentMethod YES text The method of payment that the user chooses, for example Barion, cash etc.
step YES integer It representing the current number of step in the checkout process.
contentType NO text Usually this value should be "Product".
coupon NO text The coupon code that is being used.
creative NO text The name or description of the promotion for the cart, for example a promotion picture filename or slogan of the promotion that starts the checkout automatically.
currency NO text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
customerValue NO float A metric that you define that measures the value of the action performed to your business.
list NO text In most cases this should be 'Checkout'.
opt NO text Additional information about the purchase.
orderNumber NO text The unique ID of the purchase.
positioning NO text The item's position in a list or collection (e.g. 2) or the position of the promotion on a page (e.g. banner_slot_1).
revenue NO float The total revenue associated with the transaction in the given currency. This should include all costs the customer pays like shipping or tax.
shipping NO float The price of shipping associated with the purchase in the given currency.
shippingAddress NO object The shipping address given in the format detailed below.
tax NO float The tax associated with the purchase in the given currency.

(*It's possible to add custom property)


Add payment info event implementation examples:

Click Promo (clickPromo)

  • Firing event: Button click on a promotion box only on your site.
  • User intent: View a promotion
  • Why do we need this: Users demonstrate interest in your promotion offers by clicking them

This event should be fired when one of your users selects a promotion on your site. Promotions can be usually placed on home pages, product places, in the checkout process and many other places. The promotion can be about a product, offer, brand or any other single offer or grouping of offers. This event should be implemented only on promotions that you serve on your page natively, as opposed to those served dynamically by external third party services such as Google Ads.


Click promo event properties

key required type description
contentType YES text The type of the content of the page where the promotion was selected. Possible values (only these are accepted): Page/Product/Article/Promotion/Banner/Misc.
creative YES text The name or description of the promotion, for example a promotion picture filename or slogan of the promotion.
id YES text Unique ID of the promotion clicked on your site.
name YES text Full name of the promotion.
brand NO text Brand of the item in the promotion clicked.
category NO text The category (eg. 'winter shoes' or 'summer shoes') or subcategory branch (eg. 'clothes|shoes|winter' or 'clothes|shoes|summer', separate levels with '|') of the item in the promotion clicked.
contents NO array An array of JS objects for detailing multiple items promoted. For more details see the table below.
currency NO text (ISO 4217) Currency that the promoted offer is listed in. 3 digit ISO 4217 format is preferred (eg. HUF, EUR).
customerValue NO float The value of a user performing this event to the business.
ean NO text Contains the International Article Number (EAN) of the item if available.
list NO text The collection that the promotion clicked is in from one of these possible values: HomePage/SearchPage/ProductPage/Recommendation/ComparisonPage/BasketPage/Checkout/Misc
positioning NO text The promotion's position in the list or collection (e.g. 2) or the position of the creative (e.g. banner_slot_1)
quantity NO float The quantity that the item is promoted in, measured in the unit provided (e.g. 2).
step NO integer A number that represents the progress in the checkout process.
unit NO text The measurement unit of the item promoted (e.g. pcs, kg).
unitPrice NO float Price of one unit (that you provided) of the item promoted (in the currency that you provided).
variant NO text XS') promoted.

(*It's possible to add custom property)


Click promo event implementation examples:


Sign Up (signUp)

  • Firing event: Button click that completes the registration or login process
  • User intent: Register for or login to a user account or a newsletter subscription
  • Why do we need this: Users demonstrate interest in your market area by signing up for an account

This event should be usually sent along the set user properties event in registration process, since this event only captures the actual signup, not the user itself. This event should both be fired if a user registers for an account or subscription for the first time and when they login afterwards. Unsuccessful login or signup events should cause error events to be sent. If possible, it is better if only successful attempts send a sign up event, but it is more important for all signing ups to send an event than for each signup to be only sent once.


Sign up event properties

key required type description
contentType YES text If the user signs up for a product, then it should be 'Product' else this can be 'Page' if it is a general registration or login.
id YES text This should be your unique ID for the form used to register or login.
name YES text The name of the for used for the signing up, for example 'Register' or 'Sign In'.
brand NO text The brand of the product the user signs up for.
category NO text The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the item.
contents NO array An array of JS objects for detailing multiple items of the item. For more details see the table below.
currency NO text (ISO 4217) The currency that the price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
customerValue NO float A metric that you define that measures the value of the action performed to your business.
ean NO text Contains the International Article Number (EAN) of the offer if available.
unit NO text The unit that your subscribed item is measured in (eg. pieces, kg, hours).
unitPrice NO float The price of one measurement of your item in the given currency.
variant NO text THehvariant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)

(*It's possible to add custom property)


Sign up event implementation examples:


Search (search)

  • Firing event: Button click that starts a search on a page
  • User intent: Search for an offer on your page
  • Why do we need this: Users demonstrate interest in an offer by searching for it

This event is quite straightforward, every time a search button is clicked, this should send. If the search has no search button, but instead gives results on the change of the search box, then this event can be sent if the user clicks on a result. In this case, searches are sent asynchronously for partial search terms, which should not in themselves send an event. If you have a product selection page where items can be filtered, then the same can apply, the search string in this case can be the query that the settings make that can be read in your browser address bar in HTTP properties (eg. 'goats' in this: 'https://www.google.com/search?ei=A3rRXNHmJY-nrgSJs5HgDQ&q=goats').


Search event properties

key required type description
searchString YES text The search terms entered by the user or the HTTP property that contains the search terms.
contents NO array An array of JS objects containing the top ten results of your search.
contentType NO text Usually this should be 'Product'.
currency NO text (ISO 4217) If you have a filter that selects products by price, and the search string doesn't contain this, then you should provide it here.
customerValue NO float A metric that you define that measures the value of the action performed to your business.
id NO float The id of the search facility that the search is made in, for example of a search box or a filter array.
name NO text The name of the search facility that the search is made in, for example of a search box or a filter array.
totalResults NO integer The number of the search or filter results.

(*It's possible to add custom property)


Search event implementation examples:


Error (error)

  • Firing event: Any event that results in erroneous operation
  • User intent: Something else
  • Why do we need this: We can get more information about event failures

This event should be sent each time the page can't complete the requested operation, for examnple on 40x or 50x pages, failed form submissions et cetera.


Error event properties

key required type description
description YES text The description of the error, or preferably the full error message.
code NO int The error code.


Error event implementation examples:


Custom Event (customEvent)

  • Firing event: Any action that can't be described with our events
  • User intent: Something different
  • Why do we need this: We can get more information

This event is for describing any event that can't be otherwise described with our standard events.


Custom event properties

key required type description
_eventAction NO text The action that the user takes, eg. click.
_eventCategory NO text The category that the event falls in, you can define it for yourself, eg. 'user_settings'.
_eventLabel NO text The label associated with the event, eg. 'language_selection'.
_eventProperty NO text The property associated with the event, eg. 'unit_format'.
_eventValue NO text The value of the property associated with the event, eg. 'Inch'.


Custom event implementation examples:

Special properties

Contents value type - array of objects

key required type description
contentType YES text If this is a product page as per minimal requirements, this value should be "Product". Otherwise select a value that best fits from these: Page/Product/Article/Promotion/Banner/Misc.
currency YES text (ISO 4217) The currency that the product price is provided in, preferably in the three letter ISO 4217 format (eg. HUF, EUR).
id YES text An unique ID that you have for the offer, this can be your ID for the product or SKU.
name YES text The full name that you have for the offer, for example a product name (eg. Red Bull 24pcs carton).
quantity YES float The quantity of the product offered as initially given on the page.
totalItemPrice YES float The total price of the added items in the given currency.
unit YES text The unit that your offer is measured in (eg. pieces, kg, m).
unitPrice YES float The price of one measurement of your offer in the given currency.
brand NO text The brand of the offer.
category NO text The subcategory branch (preferred, eg. 'clothes|shoes|winter', separate levels with '|') or single category (eg. 'winter shoes' or 'summer shoes') of the offer.
description NO text The detailed description of item.
ean NO text Contains the International Article Number (EAN) of the offer if available.
imageUrl NO text The URL of the image of the viewed item.
variant NO text The variant of the offer from the list of possible identical items (eg. the color of a phone or the time and venue of a concert or movie)


Address value type - array of objects

key required type description
city NO text The complete name of the city of the recipient address.
country NO text (ISO-3166-1 alpha-2) The recipient's country code in ISO-3166-1 alpha-2 format.
deliveryMethod NO text The delivery method, if applicable.
fullName NO text The full civil or official name of the recipient.
phone NO text The phone number of the recipient.
region NO text (ISO-3166-2) The region code of the recipient address in ISO-3166-2 format.
street NO text The shipping street address with house number and other details.
street2 NO text The address, continued.
zipCode NO text The zip code of the recipient address.


Custom Property

name Value Type Description
_custom any type If our predefined events and/or object properties don't suit your needs, you can include your own, custom events and/or properties. Custom properties can be used with standard events. Custom properties must start with an underscore.

Custom property implementation examples: