<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.barion.com/index.php?action=history&amp;feed=atom&amp;title=RemoveFromCart</id>
	<title>RemoveFromCart - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.barion.com/index.php?action=history&amp;feed=atom&amp;title=RemoveFromCart"/>
	<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=RemoveFromCart&amp;action=history"/>
	<updated>2026-11-23T18:00:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://docs.barion.com/index.php?title=RemoveFromCart&amp;diff=4432&amp;oldid=prev</id>
		<title>Bujnab@barion.dev: created page</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=RemoveFromCart&amp;diff=4432&amp;oldid=prev"/>
		<updated>2024-05-23T10:03:56Z</updated>

		<summary type="html">&lt;p&gt;created page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title= removeFromCart}}&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;
&amp;lt;blockquote&amp;gt;Required event. Handling this event on your Barion shop&amp;#039;s screens is required as part of a Barion Full Pixel implementation.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Short description ==&lt;br /&gt;
&lt;br /&gt;
The event keeps track of when the user changes their mind about selecting a product for purchase, and contributes to the monitoring of user interest in products&lt;br /&gt;
&lt;br /&gt;
== Trigger ==&lt;br /&gt;
&lt;br /&gt;
A button click that results in an item being removed from the list of items selected for purchase.&lt;br /&gt;
&lt;br /&gt;
Trigger this even both for an explicit &amp;amp;quot;remove from cart&amp;amp;quot; user action, as well as when the user cancels the ongoing purchase.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;[[Barion-pixel-event-reference#custom-events-and-properties|Custom properties]] are supported.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Data type&lt;br /&gt;
!Description&lt;br /&gt;
!Required?&lt;br /&gt;
!Note&lt;br /&gt;
|-&lt;br /&gt;
!contentType&lt;br /&gt;
|One of the following string options: &amp;amp;quot;Page&amp;amp;quot;, &amp;amp;quot;Product&amp;amp;quot;, &amp;amp;quot;Article&amp;amp;quot;, &amp;amp;quot;Promotion&amp;amp;quot;, &amp;amp;quot;Banner&amp;amp;quot;, &amp;amp;quot;Misc&amp;amp;quot;&lt;br /&gt;
|The type of page that triggered the event.&lt;br /&gt;
|yes&lt;br /&gt;
|In case this is an item listing page, pass &amp;amp;quot;Product&amp;amp;quot;. Otherwise, select the option that best matches the type of page. See the event&amp;#039;s &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt; property also.&lt;br /&gt;
|-&lt;br /&gt;
!currency&lt;br /&gt;
|string ([https://www.iso.org/iso-4217-currency-codes.html ISO 4217 currency code])&lt;br /&gt;
|The currency that the associated item&amp;#039;s price is listed in.&lt;br /&gt;
|yes&lt;br /&gt;
|Required if &amp;lt;code&amp;gt;&amp;amp;quot;contentType&amp;amp;quot;: &amp;amp;quot;Product&amp;amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!id&lt;br /&gt;
|string&lt;br /&gt;
|A unique identifier for the item associated with the event.&lt;br /&gt;
|yes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!name&lt;br /&gt;
|string&lt;br /&gt;
|The full name associated with the item associated with the event.&amp;lt;/br&amp;gt;Make sure that you use the same name across Barion Pixel events for the same item or promotional material.&lt;br /&gt;
|yes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!quantity&lt;br /&gt;
|float&lt;br /&gt;
|The quantity that is displayed on the page for the item on sale.&lt;br /&gt;
|yes&lt;br /&gt;
|Required if &amp;lt;code&amp;gt;&amp;amp;quot;contentType&amp;amp;quot;: &amp;amp;quot;Product&amp;amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!totalItemPrice&lt;br /&gt;
|float&lt;br /&gt;
|The total price of the item or items added to the cart, in the specified &amp;lt;code&amp;gt;currency&amp;lt;/code&amp;gt;.&lt;br /&gt;
|yes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!unit&lt;br /&gt;
|string&lt;br /&gt;
|The displayed item&amp;#039;s unit (e.g. piece, set, liter).&lt;br /&gt;
|yes&lt;br /&gt;
|Required if &amp;lt;code&amp;gt;&amp;amp;quot;contentType&amp;amp;quot;: &amp;amp;quot;Product&amp;amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!unitPrice&lt;br /&gt;
|float&lt;br /&gt;
|The price of a single unit of the item for sale, in the &amp;lt;code&amp;gt;currency&amp;lt;/code&amp;gt; property.&lt;br /&gt;
|yes&lt;br /&gt;
|Required if &amp;lt;code&amp;gt;&amp;amp;quot;contentType&amp;amp;quot;: &amp;amp;quot;Product&amp;amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!brand&lt;br /&gt;
|string&lt;br /&gt;
|The item&amp;#039;s brand.&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!category&lt;br /&gt;
|string&lt;br /&gt;
|The |-separated subcategory chain (e.g. &amp;amp;quot;clothes|shoes|winter&amp;amp;quot;) or the single category (e.g. &amp;amp;quot;winter shoes&amp;amp;quot;) of the item for sale.&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!contents&lt;br /&gt;
|array&lt;br /&gt;
|An array of [[../05-barion-pixel-reference/00-pixel-event-reference#content|content objects]] if the page displays multiple items for sale.&lt;br /&gt;
|no&lt;br /&gt;
|Don&amp;#039;t include shipping or coupons.&lt;br /&gt;
|-&lt;br /&gt;
!coupon&lt;br /&gt;
|string&lt;br /&gt;
|The coupon code used when the user added the item to the cart.&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!creative&lt;br /&gt;
|string&lt;br /&gt;
|The associated promotion&amp;#039;s name or description, such as an advertising slogan or the name of the promotional image file.&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!customerValue&lt;br /&gt;
|float&lt;br /&gt;
|Your self-defined metric that represents the business value of the given customer (based on for example their average basket value).&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!ean&lt;br /&gt;
|string&lt;br /&gt;
|The item&amp;#039;s [https://www.ean-search.org/ International Article Number (EAN)].&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!list&lt;br /&gt;
|string&lt;br /&gt;
|Select the function of the visited page from one of the following string options: &amp;amp;quot;HomePage&amp;amp;quot;, &amp;amp;quot;SearchPage&amp;amp;quot;, &amp;amp;quot;ProductPage&amp;amp;quot;, &amp;amp;quot;Recommendation&amp;amp;quot;, &amp;amp;quot;ComparisonPage&amp;amp;quot;, &amp;amp;quot;BasketPage&amp;amp;quot;, &amp;amp;quot;Checkout&amp;amp;quot;, &amp;amp;quot;Misc&amp;amp;quot;&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!positioning&lt;br /&gt;
|string&lt;br /&gt;
|The item&amp;#039;s position in a list or collection (e.g. 2) or the position of its promotion on the page (e.g. banner_slot_1).&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!step&lt;br /&gt;
|integer&lt;br /&gt;
|The order that the visited page is displayed in within a multi-step checkout process, if applicable.&lt;br /&gt;
|no&lt;br /&gt;
|Step numbering starts at 1.&lt;br /&gt;
|-&lt;br /&gt;
!variant&lt;br /&gt;
|string&lt;br /&gt;
|The variant of the item on sale that distinguishes it from other similar items (such as color, material, or time and date).&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Barion Pixel throws the following errors in your browser console if a required property is missing or is passed in the wrong format:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Barion Pixel: Format of PROP_NAME is invalid in EVENT_NAME&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Barion Pixel: The PROP_NAME parameter of the EVENT_NAME event cannot be empty&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Sample implementation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;// sample product data for single items&lt;br /&gt;
var removeFromCartProperties = {&lt;br /&gt;
    &amp;#039;contentType&amp;#039;: &amp;#039;Product&amp;#039;,&lt;br /&gt;
    &amp;#039;currency&amp;#039;: &amp;#039;HUF&amp;#039;,&lt;br /&gt;
    &amp;#039;id&amp;#039;: &amp;#039;item_42&amp;#039;,&lt;br /&gt;
    &amp;#039;name&amp;#039;: &amp;quot;Hitchhikers&amp;#039; Guide to the Galaxy, hardcover, ISBN: 9780575115347&amp;quot;,&lt;br /&gt;
    &amp;#039;quantity&amp;#039;: 10.0,&lt;br /&gt;
    &amp;#039;totalItemPrice&amp;#039;: 49900.0,&lt;br /&gt;
    &amp;#039;unit&amp;#039;: &amp;#039;pcs.&amp;#039;,&lt;br /&gt;
    &amp;#039;unitPrice&amp;#039;: 4990.0,&lt;br /&gt;
    &amp;#039;brand&amp;#039;: &amp;#039;Gollancz&amp;#039;,&lt;br /&gt;
    &amp;#039;category&amp;#039;: &amp;#039;books|hardcover|scifi, books|hardcover|comedy&amp;#039;,&lt;br /&gt;
    &amp;#039;coupon&amp;#039;: &amp;#039;43763436874&amp;#039;,&lt;br /&gt;
    &amp;#039;creative&amp;#039;: &amp;#039;upsell_promo_42&amp;#039;,&lt;br /&gt;
    &amp;#039;customerValue&amp;#039;: 150.0,&lt;br /&gt;
    &amp;#039;ean&amp;#039;: &amp;#039;9780575115347&amp;#039;,&lt;br /&gt;
    &amp;#039;list&amp;#039;: &amp;#039;BasketPage&amp;#039;,&lt;br /&gt;
    &amp;#039;positioning&amp;#039;: &amp;#039;3&amp;#039;,&lt;br /&gt;
    &amp;#039;variant&amp;#039;: &amp;#039;hardcover&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
// sample product data for bundled items&lt;br /&gt;
var removeFromCartProperties = {&lt;br /&gt;
    &amp;#039;contentType&amp;#039;: &amp;#039;Product&amp;#039;,&lt;br /&gt;
    &amp;#039;currency&amp;#039;: &amp;#039;HUF&amp;#039;,&lt;br /&gt;
    &amp;#039;id&amp;#039;: &amp;#039;item_42pack&amp;#039;,&lt;br /&gt;
    &amp;#039;name&amp;#039;: &amp;quot;Hitchhikers&amp;#039; Guide to the Galaxy, hardcover, ISBN: 9780575115347&amp;quot;,&lt;br /&gt;
    &amp;#039;quantity&amp;#039;: 10.0,&lt;br /&gt;
    &amp;#039;totalItemPrice&amp;#039;: 150000.0,&lt;br /&gt;
    &amp;#039;unit&amp;#039;: &amp;#039;pcs.&amp;#039;,&lt;br /&gt;
    &amp;#039;unitPrice&amp;#039;: 15000.0,&lt;br /&gt;
    &amp;#039;brand&amp;#039;: &amp;#039;Gollancz&amp;#039;,&lt;br /&gt;
    &amp;#039;category&amp;#039;: &amp;#039;books|hardcover|scifi, books|hardcover|comedy&amp;#039;,&lt;br /&gt;
    &amp;#039;contents&amp;#039;: [{&lt;br /&gt;
        &amp;#039;contentType&amp;#039;: &amp;#039;Product&amp;#039;,&lt;br /&gt;
        &amp;#039;currency&amp;#039;: &amp;#039;HUF&amp;#039;,&lt;br /&gt;
        &amp;#039;id&amp;#039;: &amp;#039;item_42&amp;#039;,&lt;br /&gt;
        &amp;#039;name&amp;#039;: &amp;quot;Hitchhikers&amp;#039; Guide to the Galaxy, hardcover, ISBN: 9780575115347&amp;quot;,&lt;br /&gt;
        &amp;#039;quantity&amp;#039;: 3.0,&lt;br /&gt;
        &amp;#039;totalItemPrice&amp;#039;: 7500.0,&lt;br /&gt;
        &amp;#039;unit&amp;#039;: &amp;#039;pcs&amp;#039;,&lt;br /&gt;
        &amp;#039;unitPrice&amp;#039;: 2500.0,&lt;br /&gt;
        &amp;#039;brand&amp;#039;: &amp;#039;Gollancz&amp;#039;,&lt;br /&gt;
        &amp;#039;category&amp;#039;: &amp;#039;books|hardcover|scifi, books|hardcover|comedy&amp;#039;,&lt;br /&gt;
        &amp;#039;description&amp;#039;: &amp;#039;The Hitchhikers Guide to the Galaxy is a comedy science fiction series created by Douglas Adams.&amp;#039;,&lt;br /&gt;
        &amp;#039;ean&amp;#039;: &amp;#039;9780575115347&amp;#039;,&lt;br /&gt;
        &amp;#039;imageUrl&amp;#039;: &amp;#039;https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg&amp;#039;,&lt;br /&gt;
        &amp;#039;variant&amp;#039;: &amp;#039;hardcover&amp;#039;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
        &amp;#039;contentType&amp;#039;: &amp;#039;Product&amp;#039;,&lt;br /&gt;
        &amp;#039;currency&amp;#039;: &amp;#039;USD&amp;#039;,&lt;br /&gt;
        &amp;#039;id&amp;#039;: &amp;#039;item_42en&amp;#039;,&lt;br /&gt;
        &amp;#039;name&amp;#039;: &amp;quot;Hitchhikers&amp;#039; Guide to the Galaxy, hardcover, ISBN: 9780575115347&amp;quot;,&lt;br /&gt;
        &amp;#039;quantity&amp;#039;: 3.0,&lt;br /&gt;
        &amp;#039;totalItemPrice&amp;#039;: 25935,&lt;br /&gt;
        &amp;#039;unit&amp;#039;: &amp;#039;pcs&amp;#039;,&lt;br /&gt;
        &amp;#039;unitPrice&amp;#039;: 8645,&lt;br /&gt;
        &amp;#039;brand&amp;#039;: &amp;#039;Gollancz&amp;#039;,&lt;br /&gt;
        &amp;#039;category&amp;#039;: &amp;#039;books|hardcover|scifi, books|hardcover|comedy&amp;#039;,&lt;br /&gt;
        &amp;#039;description&amp;#039;: &amp;#039;The Hitchhikers Guide to the Galaxy is a comedy science fiction series created by Douglas Adams.&amp;#039;,&lt;br /&gt;
        &amp;#039;ean&amp;#039;: &amp;#039;9780575115347&amp;#039;,&lt;br /&gt;
        &amp;#039;imageUrl&amp;#039;: &amp;#039;https://images-na.ssl-images-amazon.com/images/I/51MzUz8rQcL._SX305_BO1,204,203,200_.jpg&amp;#039;,&lt;br /&gt;
        &amp;#039;variant&amp;#039;: &amp;#039;hardcover&amp;#039;&lt;br /&gt;
        }],&lt;br /&gt;
    &amp;#039;coupon&amp;#039;: &amp;#039;43763436874&amp;#039;,&lt;br /&gt;
    &amp;#039;creative&amp;#039;: &amp;#039;upsell_promo_42&amp;#039;,&lt;br /&gt;
    &amp;#039;customerValue&amp;#039;: 150.0,&lt;br /&gt;
    &amp;#039;ean&amp;#039;: &amp;#039;9780575115347&amp;#039;,&lt;br /&gt;
    &amp;#039;list&amp;#039;: &amp;#039;BasketPage&amp;#039;,&lt;br /&gt;
    &amp;#039;positioning&amp;#039;: &amp;#039;3&amp;#039;,&lt;br /&gt;
    &amp;#039;variant&amp;#039;: &amp;#039;hardcover&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
// Use one of these to add the event listener to the button click (use only one):&lt;br /&gt;
// vanilla JS (if you don&amp;#039;t use jQuery)&lt;br /&gt;
document.getElementById(&amp;#039;remove_button&amp;#039;).addEventListener(&amp;#039;click&amp;#039;, function() {&lt;br /&gt;
    bp(&amp;#039;track&amp;#039;, &amp;#039;removeFromCart&amp;#039;, removeFromCartProperties);&lt;br /&gt;
});&lt;br /&gt;
// jQuery&lt;br /&gt;
$(&amp;quot;#remove_button&amp;quot;).click(function() {&lt;br /&gt;
    bp(&amp;#039;track&amp;#039;, &amp;#039;removeFromCart&amp;#039;, removeFromCartProperties);&lt;br /&gt;
});&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bujnab@barion.dev</name></author>
	</entry>
</feed>