<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.barion.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Baloghz</id>
	<title>Barion Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.barion.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Baloghz"/>
	<link rel="alternate" type="text/html" href="https://docs.barion.com/Special:Contributions/Baloghz"/>
	<updated>2026-11-23T01:00:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3112</id>
		<title>Smar Dokumentacio</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3112"/>
		<updated>2021-09-17T10:57:53Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Telepítés */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Smar.js dokumentáció}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
Az Smar.js egy kiegészítő Shopify webshop tulajdonosok számára, amely segít a Barion Pixel implementálásában.&lt;br /&gt;
&lt;br /&gt;
== Előfeltételek ==&lt;br /&gt;
&lt;br /&gt;
Az smar.js megfelelő működéséhez minden oldalba (a rendelés összesítő oldalba is) be kell kötni az alábbiakat:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Telepítés ==&lt;br /&gt;
&#039;&#039;&#039;Első lépés: &#039;&#039;&#039;Az alábbi kódrészletet másolja be a záró head tag elé a theme.liquid nevű fileban. Klikkeljen a Layout &amp;gt; theme.liquid-re, a szekció szerkesztéséhez. Ne felejtse el, hogy az alapkódot is ide kell beilleszteni: https://docs.barion.com/Az-Alap-(Base)-Barion-Pixel-implementacioja.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Smar.js beépítő kód&#039;&#039;&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fontos! Az előbbi kódrészletben a(z) &#039;&#039;&amp;lt;accept button selector&amp;gt;&#039;&#039;, &#039;&#039;&amp;lt;reject button selector&amp;gt;&#039;&#039;, &#039;&#039;&amp;lt;add to cart button selector&amp;gt;&#039;&#039; értékeket minden esetben le kell cserélni a harmadik lépésben leírtak szerint.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;theme.liquid&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Másolja be a bp.js és a fenti smar.js kódrészletet a szövegmezőbe, így a beírt kódrészlet (Barion Pixel és az Smar.js javascript) az összes oldalban (a checkout oldal kivételével) megjelenik.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Második lépés: &#039;&#039;&#039;&lt;br /&gt;
Ezt követően kattintson a &#039;&#039;Settings&#039;&#039;, majd a &#039;&#039;Checkout&#039;&#039; oldalra és ismételten másolja be a bp.js és smar.js beépítő kódot az &#039;&#039;Additional scripts&#039;&#039; nevű szekcióba.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Checkout additinonal scripts&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Harmadik lépés: &#039;&#039;&#039;&lt;br /&gt;
A paramétereket az alábbiak szerint kell kitölteni mind a &#039;&#039;theme.liquid&#039;&#039; mind a &#039;&#039;Checkout additinonal scripts&#039;&#039;-be illesztett kódokban:&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: A &#039;&#039;grantConsent&#039;&#039; eseményt küldő gomb seletora&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: A &#039;&#039;rejectConsent&#039;&#039; eseményt küldő gomb selectora&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: Az &#039;&#039;addToCart&#039;&#039; eseményt küldő gomb selectora. Ez az attribútum opcionális.&lt;br /&gt;
Az smar.js jQuery-t használ, így az összes jQuery által támogatott selector használható. A selectorokról bővebb információ itt érhető el: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Példák ===&lt;br /&gt;
Példa a kód beépítésére:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A beírt selectorok ellenőrizhetőek a Google Chrome console-ban (Ctrl + Shift + I Windows-on). A nyíl ikonra kattintva (Ctrl + Shift + C) a ba felső sarokban, majd a képernyőfotón látható gombra kattintva. A megjelölt sorban látható a kiválasztott elem egyedi azonosítóját (class vagy ID) másolja át a beépítő script megfelelő attribútumába.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;grantConsent&#039;&#039; eseményfigyelőjét a &#039;&#039;cc-allow&#039;&#039; class-szal rendelkező gombra tesszük rá:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Az &#039;&#039;addToCart&#039;&#039; eseményfigyelőjét bármely elemre ráillesztjük, amelynek van add-to-cart class-a és egy olyan gombra, amelynek az ID-je &#039;&#039;add-to-cart&#039;&#039; (amennyiben az &#039;&#039;add to cart&#039;&#039; gomb a /cart oldalra irányít át, nem szükséges implementálni). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Események ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Esemény&lt;br /&gt;
! Leírás&lt;br /&gt;
! Azonosítók&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| A látogató engedélyezi a marketing célű sütik használatát&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;.cc-btn-accept-all&#039;&#039; osztályú gomb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, ha a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; be van jelölve és a látogató a kiválasztottak küldése gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| A látogató nem ad hozzáférést a marketing célű sütik használatához&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;rejectconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; nincs bejelölve és a látogató a kiválasztottak gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Termék oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Kategória oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Termék vagy szolgáltatás kosárba tétele&lt;br /&gt;
| &amp;lt;p&amp;gt;Amennyiben a &#039;&#039;add to cart&#039;&#039; gombra való kattintást a &#039;&#039;/cart&#039;&#039; oldalra irányít át, nem szükséges kitölteni&amp;lt;/p&amp;gt; vagy &amp;lt;p&amp;gt;A &#039;&#039;add2cart&#039;&#039; attribútum a megfelelő selectorokkal&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! removeFromCart&lt;br /&gt;
| Termék vagy szolgáltatás kivétele a kosárba&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| A látogató a rendelést követő köszönőoldalra jut&lt;br /&gt;
| Automatikus&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hibaelhárítás ==&lt;br /&gt;
A befűzőkód elhelyezését követően az oldal újratöltését követően a böngésző konzoljában az alábbi feliratnak kell megjelennie: &#039;&#039;Smar.js (v&amp;lt;verziószám&amp;gt;)&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3111</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3111"/>
		<updated>2021-09-17T10:57:06Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
Smar.js is an add-on library, that helps implementing the Full Barion Pixel for Shopify webshop owners.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&#039;&#039;&#039;First step: &#039;&#039;&#039;&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag in theme.liquid file. Click Layout &amp;gt; theme.liquid to edit the head section. Don&#039;t forget insert the base code here too: https://docs.barion.com/Implementing_the_Base_Barion_Pixel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Smar.js snippet&#039;&#039;&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important! The &#039;&#039;&amp;lt;accept button selector&amp;gt;&#039;&#039;, &#039;&#039;&amp;lt;reject button selector&amp;gt;&#039;&#039; and &#039;&#039;&amp;lt;add to cart button selector&amp;gt;&#039;&#039; should be replaced in the snippet above according to the instruction of the third step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;theme.liquid&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inserting bp.js and smar.js from above to the textarea effect all the pages (excluding the checkout) will have the Barion Pixel and the Smar javascript snippets.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Second step: &#039;&#039;&#039;Click &#039;&#039;Settings&#039;&#039;, then &#039;&#039;Checkout&#039;&#039; and insert the bp.js and smar.js again in the additional script section. Copy and paste the bp.js and smar.js code snippet to the checkout page too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Checkout additinonal scripts&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Third step: &#039;&#039;&#039;&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively in both checkout additional script section and theme.liquid file.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product(s) to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! removeFromCart&lt;br /&gt;
| Remove product(s) from cart&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3110</id>
		<title>Smar Dokumentacio</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3110"/>
		<updated>2021-09-17T10:55:28Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Telepítés */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Smar.js dokumentáció}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
Az Smar.js egy kiegészítő Shopify webshop tulajdonosok számára, amely segít a Barion Pixel implementálásában.&lt;br /&gt;
&lt;br /&gt;
== Előfeltételek ==&lt;br /&gt;
&lt;br /&gt;
Az smar.js megfelelő működéséhez minden oldalba (a rendelés összesítő oldalba is) be kell kötni az alábbiakat:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Telepítés ==&lt;br /&gt;
&#039;&#039;&#039;Első lépés: &#039;&#039;&#039;Az alábbi kódrészletet másolja be a záró head tag elé a theme.liquid nevű fileban. Klikkeljen a Layout &amp;gt; theme.liquid-re, a szekció szerkesztéséhez. Ne felejtsd el, hogy az alapkódot is ide kell beilleszteni: https://docs.barion.com/Az-Alap-(Base)-Barion-Pixel-implementacioja.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Smar.js beépítő kód&#039;&#039;&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fontos! Az előbbi kódrészletben a(z) &#039;&#039;&amp;lt;accept button selector&amp;gt;&#039;&#039;, &#039;&#039;&amp;lt;reject button selector&amp;gt;&#039;&#039;, &#039;&#039;&amp;lt;add to cart button selector&amp;gt;&#039;&#039; értékeket minden esetben le kell cserélni a harmadik lépésben leírtak szerint.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;theme.liquid&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Másolja be a bp.js és a fenti smar.js kódrészletet a szövegmezőbe, így a beírt kódrészlet (Barion Pixel és az Smar.js javascript) az összes oldalban (a checkout oldal kivételével) megjelenik.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Második lépés: &#039;&#039;&#039;&lt;br /&gt;
Ezt követően kattintson a &#039;&#039;Settings&#039;&#039;, majd a &#039;&#039;Checkout&#039;&#039; oldalra és ismételten másolja be a bp.js és smar.js beépítő kódot az &#039;&#039;Additional scripts&#039;&#039; nevű szekcióba.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Checkout additinonal scripts&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Harmadik lépés: &#039;&#039;&#039;&lt;br /&gt;
A paramétereket az alábbiak szerint kell kitölteni mind a &#039;&#039;theme.liquid&#039;&#039; mind a &#039;&#039;Checkout additinonal scripts&#039;&#039;-be illesztett kódokban:&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: A &#039;&#039;grantConsent&#039;&#039; eseményt küldő gomb seletora&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: A &#039;&#039;rejectConsent&#039;&#039; eseményt küldő gomb selectora&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: Az &#039;&#039;addToCart&#039;&#039; eseményt küldő gomb selectora. Ez az attribútum opcionális.&lt;br /&gt;
Az smar.js jQuery-t használ, így az összes jQuery által támogatott selector használható. A selectorokról bővebb információ itt érhető el: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Példák ===&lt;br /&gt;
Példa a kód beépítésére:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A beírt selectorok ellenőrizhetőek a Google Chrome console-ban (Ctrl + Shift + I Windows-on). A nyíl ikonra kattintva (Ctrl + Shift + C) a ba felső sarokban, majd a képernyőfotón látható gombra kattintva. A megjelölt sorban látható a kiválasztott elem egyedi azonosítóját (class vagy ID) másolja át a beépítő script megfelelő attribútumába.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;grantConsent&#039;&#039; eseményfigyelőjét a &#039;&#039;cc-allow&#039;&#039; class-szal rendelkező gombra tesszük rá:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Az &#039;&#039;addToCart&#039;&#039; eseményfigyelőjét bármely elemre ráillesztjük, amelynek van add-to-cart class-a és egy olyan gombra, amelynek az ID-je &#039;&#039;add-to-cart&#039;&#039; (amennyiben az &#039;&#039;add to cart&#039;&#039; gomb a /cart oldalra irányít át, nem szükséges implementálni). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Események ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Esemény&lt;br /&gt;
! Leírás&lt;br /&gt;
! Azonosítók&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| A látogató engedélyezi a marketing célű sütik használatát&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;.cc-btn-accept-all&#039;&#039; osztályú gomb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, ha a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; be van jelölve és a látogató a kiválasztottak küldése gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| A látogató nem ad hozzáférést a marketing célű sütik használatához&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;rejectconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; nincs bejelölve és a látogató a kiválasztottak gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Termék oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Kategória oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Termék vagy szolgáltatás kosárba tétele&lt;br /&gt;
| &amp;lt;p&amp;gt;Amennyiben a &#039;&#039;add to cart&#039;&#039; gombra való kattintást a &#039;&#039;/cart&#039;&#039; oldalra irányít át, nem szükséges kitölteni&amp;lt;/p&amp;gt; vagy &amp;lt;p&amp;gt;A &#039;&#039;add2cart&#039;&#039; attribútum a megfelelő selectorokkal&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! removeFromCart&lt;br /&gt;
| Termék vagy szolgáltatás kivétele a kosárba&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| A látogató a rendelést követő köszönőoldalra jut&lt;br /&gt;
| Automatikus&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hibaelhárítás ==&lt;br /&gt;
A befűzőkód elhelyezését követően az oldal újratöltését követően a böngésző konzoljában az alábbi feliratnak kell megjelennie: &#039;&#039;Smar.js (v&amp;lt;verziószám&amp;gt;)&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3109</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3109"/>
		<updated>2021-09-17T10:52:20Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
Smar.js is an add-on library, that helps implementing the Full Barion Pixel for Shopify webshop owners.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&#039;&#039;&#039;First step: &#039;&#039;&#039;&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag in theme.liquid file. Click Layout &amp;gt; theme.liquid to edit the head section. Don&#039;t forget insert the base code here too: https://docs.barion.com/Implementing_the_Base_Barion_Pixel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Smar.js snippet&#039;&#039;&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;theme.liquid&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inserting bp.js and smar.js from above to the textarea effect all the pages (excluding the checkout) will have the Barion Pixel and the Smar javascript snippets.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Second step: &#039;&#039;&#039;Click &#039;&#039;Settings&#039;&#039;, then &#039;&#039;Checkout&#039;&#039; and insert the bp.js and smar.js again in the additional script section. Copy and paste the bp.js and smar.js code snippet to the checkout page too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Checkout additinonal scripts&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Third step: &#039;&#039;&#039;&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively in both checkout additional script section and theme.liquid file.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product(s) to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! removeFromCart&lt;br /&gt;
| Remove product(s) from cart&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3108</id>
		<title>Smar Dokumentacio</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3108"/>
		<updated>2021-09-17T10:47:29Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Smar.js dokumentáció}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
Az Smar.js egy kiegészítő Shopify webshop tulajdonosok számára, amely segít a Barion Pixel implementálásában.&lt;br /&gt;
&lt;br /&gt;
== Előfeltételek ==&lt;br /&gt;
&lt;br /&gt;
Az smar.js megfelelő működéséhez minden oldalba (a rendelés összesítő oldalba is) be kell kötni az alábbiakat:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Telepítés ==&lt;br /&gt;
&#039;&#039;&#039;Első lépés: &#039;&#039;&#039;Az alábbi kódrészletet másolja be a záró head tag elé a theme.liquid nevű fileban. Klikkeljen a Layout &amp;gt; theme.liquid-re, a szekció szerkesztéséhez. Ne felejtsd el, hogy az alapkódot is ide kell beilleszteni: https://docs.barion.com/Az-Alap-(Base)-Barion-Pixel-implementacioja.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Smar.js beépítő kód&#039;&#039;&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;theme.liquid&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Másolja be a bp.js és a fenti smar.js kódrészletet a szövegmezőbe, így a beírt kódrészlet (Barion Pixel és az Smar.js javascript) az összes oldalban (a checkout oldal kivételével) megjelenik.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Második lépés: &#039;&#039;&#039;&lt;br /&gt;
Ezt követően kattintson a &#039;&#039;Settings&#039;&#039;, majd a &#039;&#039;Checkout&#039;&#039; oldalra és ismételten másolja be a bp.js és smar.js beépítő kódot az &#039;&#039;Additional scripts&#039;&#039; nevű szekcióba.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Checkout additinonal scripts&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Harmadik lépés: &#039;&#039;&#039;&lt;br /&gt;
A paramétereket az alábbiak szerint kell kitölteni mind a &#039;&#039;theme.liquid&#039;&#039; mind a &#039;&#039;Checkout additinonal scripts&#039;&#039;-be illesztett kódokban:&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: A &#039;&#039;grantConsent&#039;&#039; eseményt küldő gomb seletora&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: A &#039;&#039;rejectConsent&#039;&#039; eseményt küldő gomb selectora&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: Az &#039;&#039;addToCart&#039;&#039; eseményt küldő gomb selectora. Ez az attribútum opcionális.&lt;br /&gt;
Az smar.js jQuery-t használ, így az összes jQuery által támogatott selector használható. A selectorokról bővebb információ itt érhető el: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Példák ===&lt;br /&gt;
Példa a kód beépítésére:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A beírt selectorok ellenőrizhetőek a Google Chrome console-ban (Ctrl + Shift + I Windows-on). A nyíl ikonra kattintva (Ctrl + Shift + C) a ba felső sarokban, majd a képernyőfotón látható gombra kattintva. A megjelölt sorban látható a kiválasztott elem egyedi azonosítóját (class vagy ID) másolja át a beépítő script megfelelő attribútumába.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;grantConsent&#039;&#039; eseményfigyelőjét a &#039;&#039;cc-allow&#039;&#039; class-szal rendelkező gombra tesszük rá:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Az &#039;&#039;addToCart&#039;&#039; eseményfigyelőjét bármely elemre ráillesztjük, amelynek van add-to-cart class-a és egy olyan gombra, amelynek az ID-je &#039;&#039;add-to-cart&#039;&#039; (amennyiben az &#039;&#039;add to cart&#039;&#039; gomb a /cart oldalra irányít át, nem szükséges implementálni). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Események ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Esemény&lt;br /&gt;
! Leírás&lt;br /&gt;
! Azonosítók&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| A látogató engedélyezi a marketing célű sütik használatát&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;.cc-btn-accept-all&#039;&#039; osztályú gomb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, ha a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; be van jelölve és a látogató a kiválasztottak küldése gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| A látogató nem ad hozzáférést a marketing célű sütik használatához&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;rejectconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; nincs bejelölve és a látogató a kiválasztottak gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Termék oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Kategória oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Termék vagy szolgáltatás kosárba tétele&lt;br /&gt;
| &amp;lt;p&amp;gt;Amennyiben a &#039;&#039;add to cart&#039;&#039; gombra való kattintást a &#039;&#039;/cart&#039;&#039; oldalra irányít át, nem szükséges kitölteni&amp;lt;/p&amp;gt; vagy &amp;lt;p&amp;gt;A &#039;&#039;add2cart&#039;&#039; attribútum a megfelelő selectorokkal&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! removeFromCart&lt;br /&gt;
| Termék vagy szolgáltatás kivétele a kosárba&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| A látogató a rendelést követő köszönőoldalra jut&lt;br /&gt;
| Automatikus&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hibaelhárítás ==&lt;br /&gt;
A befűzőkód elhelyezését követően az oldal újratöltését követően a böngésző konzoljában az alábbi feliratnak kell megjelennie: &#039;&#039;Smar.js (v&amp;lt;verziószám&amp;gt;)&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3107</id>
		<title>Smar Dokumentacio</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3107"/>
		<updated>2021-09-17T10:47:13Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Smar.js dokumentáció}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
Az Smar.js egy kiegészítő Shopify webshop tulajdonosoknak, amely segít a Barion Pixel implementálásában.&lt;br /&gt;
&lt;br /&gt;
== Előfeltételek ==&lt;br /&gt;
&lt;br /&gt;
Az smar.js megfelelő működéséhez minden oldalba (a rendelés összesítő oldalba is) be kell kötni az alábbiakat:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Telepítés ==&lt;br /&gt;
&#039;&#039;&#039;Első lépés: &#039;&#039;&#039;Az alábbi kódrészletet másolja be a záró head tag elé a theme.liquid nevű fileban. Klikkeljen a Layout &amp;gt; theme.liquid-re, a szekció szerkesztéséhez. Ne felejtsd el, hogy az alapkódot is ide kell beilleszteni: https://docs.barion.com/Az-Alap-(Base)-Barion-Pixel-implementacioja.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Smar.js beépítő kód&#039;&#039;&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;theme.liquid&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Másolja be a bp.js és a fenti smar.js kódrészletet a szövegmezőbe, így a beírt kódrészlet (Barion Pixel és az Smar.js javascript) az összes oldalban (a checkout oldal kivételével) megjelenik.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Második lépés: &#039;&#039;&#039;&lt;br /&gt;
Ezt követően kattintson a &#039;&#039;Settings&#039;&#039;, majd a &#039;&#039;Checkout&#039;&#039; oldalra és ismételten másolja be a bp.js és smar.js beépítő kódot az &#039;&#039;Additional scripts&#039;&#039; nevű szekcióba.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Checkout additinonal scripts&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Harmadik lépés: &#039;&#039;&#039;&lt;br /&gt;
A paramétereket az alábbiak szerint kell kitölteni mind a &#039;&#039;theme.liquid&#039;&#039; mind a &#039;&#039;Checkout additinonal scripts&#039;&#039;-be illesztett kódokban:&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: A &#039;&#039;grantConsent&#039;&#039; eseményt küldő gomb seletora&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: A &#039;&#039;rejectConsent&#039;&#039; eseményt küldő gomb selectora&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: Az &#039;&#039;addToCart&#039;&#039; eseményt küldő gomb selectora. Ez az attribútum opcionális.&lt;br /&gt;
Az smar.js jQuery-t használ, így az összes jQuery által támogatott selector használható. A selectorokról bővebb információ itt érhető el: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Példák ===&lt;br /&gt;
Példa a kód beépítésére:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A beírt selectorok ellenőrizhetőek a Google Chrome console-ban (Ctrl + Shift + I Windows-on). A nyíl ikonra kattintva (Ctrl + Shift + C) a ba felső sarokban, majd a képernyőfotón látható gombra kattintva. A megjelölt sorban látható a kiválasztott elem egyedi azonosítóját (class vagy ID) másolja át a beépítő script megfelelő attribútumába.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;grantConsent&#039;&#039; eseményfigyelőjét a &#039;&#039;cc-allow&#039;&#039; class-szal rendelkező gombra tesszük rá:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Az &#039;&#039;addToCart&#039;&#039; eseményfigyelőjét bármely elemre ráillesztjük, amelynek van add-to-cart class-a és egy olyan gombra, amelynek az ID-je &#039;&#039;add-to-cart&#039;&#039; (amennyiben az &#039;&#039;add to cart&#039;&#039; gomb a /cart oldalra irányít át, nem szükséges implementálni). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Események ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Esemény&lt;br /&gt;
! Leírás&lt;br /&gt;
! Azonosítók&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| A látogató engedélyezi a marketing célű sütik használatát&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;.cc-btn-accept-all&#039;&#039; osztályú gomb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, ha a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; be van jelölve és a látogató a kiválasztottak küldése gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| A látogató nem ad hozzáférést a marketing célű sütik használatához&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;rejectconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; nincs bejelölve és a látogató a kiválasztottak gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Termék oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Kategória oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Termék vagy szolgáltatás kosárba tétele&lt;br /&gt;
| &amp;lt;p&amp;gt;Amennyiben a &#039;&#039;add to cart&#039;&#039; gombra való kattintást a &#039;&#039;/cart&#039;&#039; oldalra irányít át, nem szükséges kitölteni&amp;lt;/p&amp;gt; vagy &amp;lt;p&amp;gt;A &#039;&#039;add2cart&#039;&#039; attribútum a megfelelő selectorokkal&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! removeFromCart&lt;br /&gt;
| Termék vagy szolgáltatás kivétele a kosárba&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| A látogató a rendelést követő köszönőoldalra jut&lt;br /&gt;
| Automatikus&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hibaelhárítás ==&lt;br /&gt;
A befűzőkód elhelyezését követően az oldal újratöltését követően a böngésző konzoljában az alábbi feliratnak kell megjelennie: &#039;&#039;Smar.js (v&amp;lt;verziószám&amp;gt;)&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3100</id>
		<title>Smar Dokumentacio</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3100"/>
		<updated>2021-09-13T13:09:09Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Telepítés */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Smar.js dokumentáció}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Előfeltételek ==&lt;br /&gt;
&lt;br /&gt;
Az smar.js jelenlegi verziója nem küldi az &#039;&#039;initiateCheckout&#039;&#039; és &#039;&#039;initiatePurchase&#039;&#039; eseményeket. Minden oldalba (a rendelés összesítő oldalba is) be kell kötni az alábbiakat:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Telepítés ==&lt;br /&gt;
Az alábbi kódrészletet másolja be a záró body tag elé:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;Smar.js beépítő kód&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Klikkeljen a Layout &amp;gt; theme.liquid-re, a szekció szerkesztéséhez&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Másolja be a bp.js és a fenti smar.js kódrészletet a szövegmezőbe, így a beírt kódrészlet (Barion Pixel és az Smar.js javascript) az összes oldalban (a checkout oldal kivételével) megjelenik. Ezt követően kattintson a &#039;&#039;Settings&#039;&#039;, majd a &#039;&#039;Checkout&#039;&#039; oldalra és ismételten másolja be a bp.js és smar.js beépítő kódot.&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Másolja be a bp.js és smar.js beépítő kódot a Checkout oldalra is&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A paramétereket az alábbiak szerint kell kitölteni:&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: A &#039;&#039;grantConsent&#039;&#039; eseményt küldő gomb seletora&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: A &#039;&#039;rejectConsent&#039;&#039; eseményt küldő gomb selectora&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: Az &#039;&#039;addToCart&#039;&#039; eseményt küldő gomb selectora. Ez az attribútum opcionális.&lt;br /&gt;
Az smar.js jQuery-t használ, így az összes jQuery által támogatott selector használható. A selectorokról bővebb információ itt érhető el: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Példák ===&lt;br /&gt;
Példa a kód beépítésére:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A beírt selectorok ellenőrizhetőek a Google Chrome console-ban (Ctrl + Shift + I Windows-on). A nyíl ikonra kattintva (Ctrl + Shift + C) a ba felső sarokban, majd a képernyőfotón látható gombra kattintva. A megjelölt sorban látható a kiválasztott elem egyedi azonosítóját (class vagy ID) másolja át a beépítő script megfelelő attribútumába.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;grantConsent&#039;&#039; eseményfigyelőjét a &#039;&#039;cc-allow&#039;&#039; class-szal rendelkező gombra tesszük rá:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Az &#039;&#039;addToCart&#039;&#039; eseményfigyelőjét bármely elemre ráillesztjük, amelynek van add-to-cart class-a és egy olyan gombra, amelynek az ID-je &#039;&#039;add-to-cart&#039;&#039; (amennyiben az &#039;&#039;add to cart&#039;&#039; gomb a /cart oldalra irányít át, nem szükséges implementálni). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Események ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Esemény&lt;br /&gt;
! Leírás&lt;br /&gt;
! Azonosítók&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| A látogató engedélyezi a marketing célű sütik használatát&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;.cc-btn-accept-all&#039;&#039; osztályú gomb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, ha a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; be van jelölve és a látogató a kiválasztottak küldése gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| A látogató nem ad hozzáférést a marketing célű sütik használatához&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;rejectconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; nincs bejelölve és a látogató a kiválasztottak gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Termék oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Kategória oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Termék vagy szolgáltatás kosárba tétele&lt;br /&gt;
| &amp;lt;p&amp;gt;Amennyiben a &#039;&#039;add to cart&#039;&#039; gombra való kattintást a &#039;&#039;/cart&#039;&#039; oldalra irányít át, nem szükséges kitölteni&amp;lt;/p&amp;gt; vagy &amp;lt;p&amp;gt;A &#039;&#039;add2cart&#039;&#039; attribútum a megfelelő selectorokkal&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| A látogató a rendelést követő köszönőoldalra jut&lt;br /&gt;
| Automatikus&lt;br /&gt;
|}&lt;br /&gt;
== Hibaelhárítás ==&lt;br /&gt;
A befűzőkód elhelyezését követően az oldal újratöltését követően a böngésző konzoljában az alábbi feliratnak kell megjelennie: &#039;&#039;Smar.js (v&amp;lt;verziószám&amp;gt;)&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3099</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3099"/>
		<updated>2021-09-13T12:56:55Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;Smar.js snippet&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Insert the bp.js and smar.js from above to the textarea, thus all the pages (excluding the checkout) will have the Barion Pixel and the Smar javascript snippets. Then click &#039;&#039;Settings&#039;&#039;, then &#039;&#039;Checkout&#039;&#039; and insert the bp.js and smar.js again in the additional script section.&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Copy and paste the bp.js and smar.js code snippet to the checkout page too&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3098</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3098"/>
		<updated>2021-09-13T12:52:35Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;Smar.js snippet&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Copy and paste the bp.js and smar.js code snippet from above&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;Settings&#039;&#039;, then &#039;&#039;Checkout&#039;&#039; and insert the bp.js and smar.js again in the additional script section.&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3097</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3097"/>
		<updated>2021-09-13T12:43:30Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Snippet in the order status page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3096</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3096"/>
		<updated>2021-09-13T12:42:58Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Insert the snippet to the text editor&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3095</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3095"/>
		<updated>2021-09-13T12:42:41Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liguid2.png|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Insert the snippet to the text editor&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=File:Shopify_theme.liguid2.png&amp;diff=3094</id>
		<title>File:Shopify theme.liguid2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=File:Shopify_theme.liguid2.png&amp;diff=3094"/>
		<updated>2021-09-13T12:39:51Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3093</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3093"/>
		<updated>2021-09-13T12:06:17Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|250px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3092</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3092"/>
		<updated>2021-09-13T12:06:00Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|250px]]&lt;br /&gt;
&#039;&#039;Click Layout &amp;gt; theme.liquid to edit the head section&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3091</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3091"/>
		<updated>2021-09-13T12:05:23Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| [[File:Shopify_theme.liquid.PNG|250px]] | &lt;br /&gt;
|:--:| &lt;br /&gt;
| *Click Layout &amp;gt; theme.liquid to edit the head section* |&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3090</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3090"/>
		<updated>2021-09-13T12:04:48Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|250px]]&lt;br /&gt;
*Click Layout &amp;gt; theme.liquid to edit the head section*&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3089</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3089"/>
		<updated>2021-09-13T11:59:13Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|250px]]&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3088</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3088"/>
		<updated>2021-09-13T11:59:03Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3087</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3087"/>
		<updated>2021-09-13T11:58:50Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet somewhere between the opening and closing head tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Shopify_theme.liquid.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=File:Shopify_theme.liquid.PNG&amp;diff=3086</id>
		<title>File:Shopify theme.liquid.PNG</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=File:Shopify_theme.liquid.PNG&amp;diff=3086"/>
		<updated>2021-09-13T11:31:17Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3083</id>
		<title>Smar Dokumentacio</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Dokumentacio&amp;diff=3083"/>
		<updated>2021-09-08T12:21:35Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: Created page with &amp;quot;{{PageTitle|title=Smar.js dokumentáció}}  {| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot; | __TOC__ |}  == Előfeltételek ==  Az smar.js jelenlegi verziója nem küldi az &amp;#039;&amp;#039;initi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Smar.js dokumentáció}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Előfeltételek ==&lt;br /&gt;
&lt;br /&gt;
Az smar.js jelenlegi verziója nem küldi az &#039;&#039;initiateCheckout&#039;&#039; és &#039;&#039;initiatePurchase&#039;&#039; eseményeket. Minden oldalba (a rendelés összesítő oldalba is) be kell kötni az alábbiakat:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Telepítés ==&lt;br /&gt;
Az alábbi kódrészletet másolja be a záró body tag elé:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A paramétereket az alábbiak szerint kell kitölteni:&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: A &#039;&#039;grantConsent&#039;&#039; eseményt küldő gomb seletora&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: A &#039;&#039;rejectConsent&#039;&#039; eseményt küldő gomb selectora&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: Az &#039;&#039;addToCart&#039;&#039; eseményt küldő gomb selectora. Ez az attribútum opcionális.&lt;br /&gt;
Az smar.js jQuery-t használ, így az összes jQuery által támogatott selector használható. A selectorokról bővebb információ itt érhető el: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Példák ===&lt;br /&gt;
Példa a kód beépítésére:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A beírt selectorok ellenőrizhetőek a Google Chrome console-ban (Ctrl + Shift + I Windows-on). A nyíl ikonra kattintva (Ctrl + Shift + C) a ba felső sarokban, majd a képernyőfotón látható gombra kattintva. A megjelölt sorban látható a kiválasztott elem egyedi azonosítóját (class vagy ID) másolja át a beépítő script megfelelő attribútumába.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;grantConsent&#039;&#039; eseményfigyelőjét a &#039;&#039;cc-allow&#039;&#039; class-szal rendelkező gombra tesszük rá:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Az &#039;&#039;addToCart&#039;&#039; eseményfigyelőjét bármely elemre ráillesztjük, amelynek van add-to-cart class-a és egy olyan gombra, amelynek az ID-je &#039;&#039;add-to-cart&#039;&#039; (amennyiben az &#039;&#039;add to cart&#039;&#039; gomb a /cart oldalra irányít át, nem szükséges implementálni). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Események ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Esemény&lt;br /&gt;
! Leírás&lt;br /&gt;
! Azonosítók&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| A látogató engedélyezi a marketing célű sütik használatát&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;.cc-btn-accept-all&#039;&#039; osztályú gomb&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; eseményt akkor is küldi, ha a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; be van jelölve és a látogató a kiválasztottak küldése gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| A látogató nem ad hozzáférést a marketing célű sütik használatához&lt;br /&gt;
| &amp;lt;p&amp;gt;A &#039;&#039;rejectconsent&#039;&#039; attribútum által kijelölt elem&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; eseményt akkor is küldi, amikor a &#039;&#039;#marketing-cookies-checkbox&#039;&#039; nincs bejelölve és a látogató a kiválasztottak gombra kattint&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Termék oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Kategória oldal&lt;br /&gt;
| Automatikus&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Termék vagy szolgáltatás kosárba tétele&lt;br /&gt;
| &amp;lt;p&amp;gt;Amennyiben a &#039;&#039;add to cart&#039;&#039; gombra való kattintást a &#039;&#039;/cart&#039;&#039; oldalra irányít át, nem szükséges kitölteni&amp;lt;/p&amp;gt; vagy &amp;lt;p&amp;gt;A &#039;&#039;add2cart&#039;&#039; attribútum a megfelelő selectorokkal&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Nem küldi&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| A látogató a rendelést követő köszönőoldalra jut&lt;br /&gt;
| Automatikus&lt;br /&gt;
|}&lt;br /&gt;
== Hibaelhárítás ==&lt;br /&gt;
A befűzőkód elhelyezését követően az oldal újratöltését követően a böngésző konzoljában az alábbi feliratnak kell megjelennie: &#039;&#039;Smar.js (v&amp;lt;verziószám&amp;gt;)&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3082</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3082"/>
		<updated>2021-09-08T09:50:54Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3081</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3081"/>
		<updated>2021-09-08T09:50:45Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
[[File:Smar_screenshot.png|200px]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3080</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3080"/>
		<updated>2021-09-08T09:49:41Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
Image:Smar_screenshot.png|Smar screenshot&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=File:Smar_screenshot.png&amp;diff=3079</id>
		<title>File:Smar screenshot.png</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=File:Smar_screenshot.png&amp;diff=3079"/>
		<updated>2021-09-08T09:46:21Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3078</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3078"/>
		<updated>2021-09-08T09:35:27Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
After inserting the embedding snippet to the source of the webpage, hit the refresh button. The following message should appear in the console: &#039;&#039;Smar.js (v&amp;lt;current version&amp;gt;)&#039;&#039; loaded.&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3077</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3077"/>
		<updated>2021-09-08T09:34:05Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3076</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3076"/>
		<updated>2021-09-08T09:32:37Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id (if the &#039;&#039;add to cart&#039;&#039; button redirects to the /cart page, then this attribute can be omitted.). &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;grantconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| &amp;lt;p&amp;gt;Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! addToCart&lt;br /&gt;
| Add product to cart&lt;br /&gt;
| &amp;lt;p&amp;gt;If clicking the &#039;&#039;add to cart&#039;&#039; button redirects to the &#039;&#039;/cart&#039;&#039; page, then it is automatic&amp;lt;/p&amp;gt; or &amp;lt;p&amp;gt;Fill the &#039;&#039;add2cart&#039;&#039; attribute with the appropriate selector&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! initiateCheckout&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! initiatePurchase&lt;br /&gt;
| Does not send&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! purchase&lt;br /&gt;
| Customer reaches the thank you page after ordering&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3075</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3075"/>
		<updated>2021-09-08T09:25:46Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id. &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! grantConsent&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector&amp;lt;br/&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;br/&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&lt;br /&gt;
|-&lt;br /&gt;
! rejectConsent&lt;br /&gt;
| Customer rejects access to storing marketing cookies&lt;br /&gt;
| Fill the &#039;&#039;rejectconsent&#039;&#039; attribute with the appropriate selector&amp;lt;br/&amp;gt;A &#039;&#039;rejectConsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is unchecked&lt;br /&gt;
|-&lt;br /&gt;
! contentView&lt;br /&gt;
| Product page&lt;br /&gt;
| Automatic&lt;br /&gt;
|-&lt;br /&gt;
! categorySelection&lt;br /&gt;
| Category page&lt;br /&gt;
| Automatic&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3074</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3074"/>
		<updated>2021-09-08T09:04:35Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id. &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector&amp;lt;br/&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, when the user clicks on a button with &#039;&#039;.cc-btn-accept-all&#039;&#039; class&amp;lt;br/&amp;gt;A &#039;&#039;grantconsent&#039;&#039; is also sent, if the checkbox with &#039;&#039;#marketing-cookies-checkbox&#039;&#039; is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3073</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3073"/>
		<updated>2021-09-08T09:01:02Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;grantConsent&#039;&#039; event listener is attached to a button with &#039;&#039;cc-allow&#039;&#039; class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The &#039;&#039;addToCart&#039;&#039; event listener is attached to any element with add-to-cart class and a button with &#039;&#039;add-to-cart&#039;&#039; id. &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3072</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3072"/>
		<updated>2021-09-08T09:00:06Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;button class=&amp;quot;cc-btn cc-allow&amp;quot;&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;button id=&amp;quot;add-to-cart&amp;quot;&amp;gt;Add to cart&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3071</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3071"/>
		<updated>2021-09-08T08:59:11Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3070</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3070"/>
		<updated>2021-09-08T08:59:02Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3069</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3069"/>
		<updated>2021-09-08T08:58:53Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot; grantconsent=&amp;quot;button.cc-allow&amp;quot; rejectconsent=&amp;quot;button.cc-dismiss&amp;quot; add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3068</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3068"/>
		<updated>2021-09-08T08:57:56Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* &#039;&#039;grantconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;grantConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;rejectconsent&#039;&#039;: The selector of the element on which the user clicks a &#039;&#039;rejectConsent&#039;&#039; event should be sent&lt;br /&gt;
* &#039;&#039;add2cart&#039;&#039;: The selector of the element on which the user clicks an &#039;&#039;addToCart&#039;&#039; event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: [https://api.jquery.com/category/selectors/ jQuery selectors]&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3067</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3067"/>
		<updated>2021-09-08T08:53:36Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* _grantconsent_: The selector of the element on which the user clicks a _grantConsent_ event should be sent&lt;br /&gt;
* _rejectconsent_: The selector of the element on which the user clicks a _rejectConsent_ event should be sent&lt;br /&gt;
* _add2cart_: The selector of the element on which the user clicks an _addToCart_ event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3066</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3066"/>
		<updated>2021-09-08T08:53:05Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* _grantconsent_: The selector of the element on which the user clicks a _grantConsent_ event should be sent&lt;br /&gt;
* _rejectconsent_: The selector of the element on which the user clicks a _rejectConsent_ event should be sent&lt;br /&gt;
* _add2cart_: The selector of the element on which the user clicks an _addToCart_ event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3065</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3065"/>
		<updated>2021-09-08T08:52:51Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* _grantconsent_: The selector of the element on which the user clicks a _grantConsent_ event should be sent&lt;br /&gt;
* _rejectconsent_: The selector of the element on which the user clicks a _rejectConsent_ event should be sent&lt;br /&gt;
* _add2cart_: The selector of the element on which the user clicks an _addToCart_ event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3064</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3064"/>
		<updated>2021-09-08T08:52:27Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    &amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* _grantconsent_: The selector of the element on which the user clicks a _grantConsent_ event should be sent&lt;br /&gt;
* _rejectconsent_: The selector of the element on which the user clicks a _rejectConsent_ event should be sent&lt;br /&gt;
* _add2cart_: The selector of the element on which the user clicks an _addToCart_ event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3063</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3063"/>
		<updated>2021-09-08T08:52:03Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&lt;br /&gt;
        &amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
        &amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot; rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
* _grantconsent_: The selector of the element on which the user clicks a _grantConsent_ event should be sent&lt;br /&gt;
* _rejectconsent_: The selector of the element on which the user clicks a _rejectConsent_ event should be sent&lt;br /&gt;
* _add2cart_: The selector of the element on which the user clicks an _addToCart_ event should be sent. This attribute is optional.&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3062</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3062"/>
		<updated>2021-09-08T08:49:14Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase events. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3061</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3061"/>
		<updated>2021-09-08T08:41:45Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
* jQuery 1.1+&lt;br /&gt;
* bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3060</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3060"/>
		<updated>2021-09-08T08:30:08Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
- jQuery 1.1+&lt;br /&gt;
- bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Példák a consent események implementációira&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3059</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3059"/>
		<updated>2021-09-08T08:29:17Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
- jQuery 1.1+&lt;br /&gt;
- bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
		grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
		rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
		add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
	&amp;lt;nowiki&amp;gt;&lt;br /&gt;
		&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
		&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3058</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3058"/>
		<updated>2021-09-08T08:27:21Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
- jQuery 1.1+&lt;br /&gt;
- bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
	&amp;lt;!-- SMar.js --&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; id=&amp;quot;barion_smar&amp;quot; async=&amp;quot;true&amp;quot; grantconsent=&amp;quot;&amp;lt;accept button selector&amp;gt;&amp;quot;&lt;br /&gt;
	rejectconsent=&amp;quot;&amp;lt;reject button selector&amp;gt;&amp;quot; add2cart=&amp;quot;&amp;lt;add to cart button selector&amp;gt;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;https://pixel.barion.com/smar.js&amp;quot; async=&amp;quot;true&amp;quot; id=&amp;quot;barion_smar&amp;quot;&lt;br /&gt;
	grantconsent=&amp;quot;button.cc-allow&amp;quot;&lt;br /&gt;
	rejectconsent=&amp;quot;button.cc-dismiss&amp;quot;&lt;br /&gt;
	add2cart=&amp;quot;.add-to-cart, button#add-to-cart&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button class=”cc-btn cc-allow”&amp;gt;Accept&amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
	&amp;lt;span class=”add-to-cart”&amp;gt;Add to cart&amp;lt;/span&amp;gt;&lt;br /&gt;
	&amp;lt;button id=”add-to-cart”&amp;gt;Add to cart&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3057</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3057"/>
		<updated>2021-09-07T14:27:55Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
- jQuery 1.1+&lt;br /&gt;
- bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
|&lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
|&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3056</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3056"/>
		<updated>2021-09-07T14:00:46Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
•	jQuery 1.1+&lt;br /&gt;
•	bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
|&lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
|&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3055</id>
		<title>Smar Documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Smar_Documentation&amp;diff=3055"/>
		<updated>2021-09-07T14:00:11Z</updated>

		<summary type="html">&lt;p&gt;Baloghz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
{{PageTitle|title=Documentation of smar.js}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
The current version of smar.js does not send initiateCheckout and initiatePurchase event. All pages (including the order summary) need to include the following libraries:&lt;br /&gt;
•	jQuery 1.1+&lt;br /&gt;
•	bp.js&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Paste the following snippet before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
Write the selectors for the buttons to the attributes respectively.&lt;br /&gt;
- _grantconsent_: The selector of the element on which the user clicks a grantconsent event should be sent&lt;br /&gt;
- _rejectconsent_: The selector of the element on which the user clicks a rejectconsent event should be sent&lt;br /&gt;
- _add2cart_: The selector of the element on which the user clicks an addtocart event should be sent. This attribute is optional&lt;br /&gt;
As the smar.js library relies on jQuery, all the selector or selectors can be used here. More information on selectors can be found here: https://api.jquery.com/category/selectors/&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Here is an example of the embedding code:&lt;br /&gt;
&lt;br /&gt;
The selectors can be checked with the help of Google Chrome console (Ctrl + Shift + I on Windows), then click on the arrow icon in the top left corner, then click on the button as shown on the screenshot below. In the selected line, copy a unique label from the class attribute of the button tag to the appropriate attribute of the embedding script tag.&lt;br /&gt;
&lt;br /&gt;
The grantconsent event listener is attached to a button with cc-allow class:&lt;br /&gt;
&lt;br /&gt;
The addtocart event listener is attached to any element with add-to-cart class and a button with add-to-cart id. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Event&lt;br /&gt;
! Description&lt;br /&gt;
! Needed identifiers&lt;br /&gt;
|-&lt;br /&gt;
! Event&lt;br /&gt;
| grantConsent&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| Customer grants access to storing marketing cookies&lt;br /&gt;
|-&lt;br /&gt;
! Needed Identifiers&lt;br /&gt;
| Fill the _grantconsent_ attribute with the appropriate selector &lt;br /&gt;
|&lt;br /&gt;
| A _grantconsent_ is also sent, when the user clicks on a button with _.cc-btn-accept-all_ class&lt;br /&gt;
|&lt;br /&gt;
| A _grantconsent_ is also sent, if the checkbox with _#marketing-cookies-checkbox_ is checked&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Baloghz</name></author>
	</entry>
</feed>