{"id":13765,"date":"2024-03-20T17:25:28","date_gmt":"2024-03-20T16:25:28","guid":{"rendered":"https:\/\/helpcenter.blendee.com\/article\/how-to-add-and-track-custom-actions\/"},"modified":"2024-04-23T15:59:45","modified_gmt":"2024-04-23T13:59:45","slug":"how-to-add-and-track-custom-actions","status":"publish","type":"article","link":"https:\/\/helpcenter.streamwise.it\/en\/article\/how-to-add-and-track-custom-actions\/","title":{"rendered":"How to Add and Track Custom Actions"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" src=\"https:\/\/player.vimeo.com\/video\/932505019?dnt=1&amp;app_id=122963\" width=\"699\" height=\"393\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Blendee allows you to customize the data that needs to be tracked to your specific needs.<\/p>\n\n\n\n<p>In order to carry out these operations, a tracking system of actions\/events that take place on the website is offered.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Implementation<\/h3>\n\n\n\n<p>Actions can be sent to Blendee by inserting, within the action to be mapped (e.g. a drop down menu of which you want to track the choice made by the customer) the following string of code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>_sbnaq.push(&#91;\"trkCustomAction\", {\"eventCategory\": \"CATEGORIA\", \"eventAction\": \"AZIONE\", \"eventValue\": \"VALORE\"}]);\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Field Name<\/th><th>Value Type<\/th><th>Requisite?<\/th><th>Description<\/th><\/tr><tr><td>eventCategory<\/td><td>  Text<\/td><td>Yes<\/td><td>Name of the category into which the event will be grouped<\/td><\/tr><tr><td>eventAction<\/td><td>  Text<\/td><td>Yes<\/td><td>The event code<\/td><\/tr><tr><td>eventValue<\/td><td>  Text<\/td><td>no<\/td><td>The contextual value associated with the action<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">An example<\/h3>\n\n\n\n<p>In this example, you want to pass to Blendee the value that is selected by a customer in a drop-down menu.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$('select').on('change', function() {\n _sbnaq.push(&#91;\"trkCustomAction\", {\"eventCategory\": \"categoryAction\", \"eventAction\": \"OnChangeSelect\", \"eventValue\": this.value}]);\n });<\/code><\/pre>\n\n\n\n<p>Each time the user changes the value, triggers the on(&#8216;change&#8217;, function()) event, the Blendee tracker sends the choice data to the platform.<\/p>\n\n\n\n<p>The data coming from the Custom Action system can then be used within Blendee to create Behavioral filters.<\/p>\n<div class=\"wrap-post-useful post_useful_13765\">\n<p><div style=\"color: black; margin-bottom: 15px;\"><strong>Was this content useful?<\/strong><\/div><\/p>\n<p class=\"post_useful_success post_useful_success_13765\">Thanks for contributing!<\/p>\n<div class=\"post-useful-buttons post_useful_buttons_13765\">\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"Yes\" class=\"post-useful-vote post-useful-vote-yes\" data-id=\"13765\" data-rate=\"1\">Yes<\/a>\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"No\" class=\"post-useful-vote post-useful-vote-no\" data-id=\"13765\" data-rate=\"0\">No<\/a>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Blendee allows you to customize the data that needs to be tracked to your specific needs. In order to carry out these operations, a tracking system of actions\/events that take place on the website is offered. Implementation Actions can be sent to Blendee by inserting, within the action to be mapped (e.g. a drop down [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","format":"standard","article-category":[208,623],"article-tag":[772,643,209,773,167],"class_list":["post-13765","article","type-article","status-publish","format-standard","hentry","article-category-filters","article-category-users","article-tag-custom-en","article-tag-custom-action-en","article-tag-filters","article-tag-real-time-en","article-tag-segments"],"_links":{"self":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13765"}],"collection":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13765\/revisions"}],"predecessor-version":[{"id":14968,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13765\/revisions\/14968"}],"wp:attachment":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/media?parent=13765"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-category?post=13765"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-tag?post=13765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}