{"id":11,"date":"2014-06-15T16:49:35","date_gmt":"2014-06-15T16:49:35","guid":{"rendered":"https:\/\/www.nvecta.com\/blog\/?p=11"},"modified":"2022-06-25T06:24:52","modified_gmt":"2022-06-25T06:24:52","slug":"dynamic-notification","status":"publish","type":"post","link":"https:\/\/www.nvecta.com\/blog\/dynamic-notification\/","title":{"rendered":"Dynamic Notification"},"content":{"rendered":"<p><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">Dynamic Notifications offer you a nice way of showing highly personalized messages or offering by adding dynamic text such as username, dynamic discount value etc.<\/span><!--more--><\/p>\n<p><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">You can add tokens to any of the 3 fields inside your Notification:<\/span><\/p>\n<ul class=\"list-content\" style=\"margin: 0px; padding: 0px; border: 0px; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 23px; vertical-align: baseline; list-style: none; color: #555555; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;\">\n<li style=\"margin: 0px 0px 0px 20px; padding: 0px 0px 0px 2px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; list-style: decimal;\"><span style=\"margin: 0px; padding: 0px; border: 0px none; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; text-decoration: underline;\">Description<\/span><span class=\"Apple-converted-space\">&nbsp;<\/span>&#8211; you can use specific tokens like username in your notification content<\/li>\n<li style=\"margin: 0px 0px 0px 20px; padding: 0px 0px 0px 2px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; list-style: decimal;\"><span style=\"margin: 0px; padding: 0px; border: 0px none; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; text-decoration: underline;\">Call to action button text<\/span><span class=\"Apple-converted-space\">&nbsp;<\/span>&#8211; use tokes to say something like &#8220;Hurry Mr. Sid !&#8221; on the button<\/li>\n<li style=\"margin: 0px 0px 0px 20px; padding: 0px 0px 0px 2px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; list-style: decimal;\"><span style=\"margin: 0px; padding: 0px; border: 0px none; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; text-decoration: underline;\">Call to action URL<\/span><span class=\"Apple-converted-space\">&nbsp;<\/span>&#8211; use tokens in the URL for tracking or user <a href=\"https:\/\/www.nvecta.com\/blog\/what-is-personalization\/\">personalization<\/a> parameters<\/li>\n<\/ul>\n<p><a href=\"https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/dynamic-notification1.png\" target=\"_blank\" rel=\"noopener\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-8352  aligncenter\" src=\"https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/dynamic-notification1.png\" alt=\"dynamic notification1\" width=\"388\" height=\"180\" srcset=\"https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/dynamic-notification1.png 426w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/dynamic-notification1.png 300w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/dynamic-notification1.png 370w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/dynamic-notification1.png 270w\" sizes=\"(max-width: 388px) 100vw, 388px\" \/><\/a><\/p>\n<p><strong>Defining a token<br \/>\n<\/strong><\/p>\n<p>We call placeholders of the dynamic text as Tokens. Tokens should be enclosed within a double pair of square parentheses like.<code class=\"inline\" style=\"margin: 0px; padding: 0.25em; border: 1px solid #cccccc; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 23px; vertical-align: baseline; letter-spacing: 0.01em; color: #333333; background-color: #f8f8f8; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">[[yourTokenName]]<\/code><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\"> While creating\/editing a Notification, you can any number of such tokens to the input fields. Before displaying this Notification on your website, we scan all the four fields, mentioned above, for tokens.<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.nvecta.com\/blog\/dynamic-notification\/#Setting_default_token_values\" >Setting default token values<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.nvecta.com\/blog\/dynamic-notification\/#Passing_token_data_via_the_Javascript_API\" >Passing token data via the Javascript API<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.nvecta.com\/blog\/dynamic-notification\/#Filter_clickthroughs_based_on_token_data\" >Filter clickthroughs based on token data<\/a><\/li><\/ul><\/nav><\/div>\n<h2 style=\"margin: 0px; padding: 0px 0px 8px; border: 0px; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; line-height: 18px; vertical-align: baseline; color: #000000; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;\"><span class=\"ez-toc-section\" id=\"Setting_default_token_values\"><\/span>Setting default token values<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">After creating a Notification, if you used tokens in any field, you&#8217;ll get to see a table on the same page. Therein, you&#8217;ll see options to set their corresponding default values. You are supposed to pass the token data via our Javascript API (next section) &#8211; in case you don&#8217;t we replace the tokens with these default values. You can also choose to<span class=\"Apple-converted-space\">&nbsp;<\/span><\/span><strong style=\"margin: 0px; padding: 0px; border: 0px; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: bolder; line-height: 23px; vertical-align: baseline; color: #555555; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;\">Hide notification if any of the token values are empty<\/strong><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">. If you select this option, in a corresponding situation, the Notification is not shown on your website.<\/span><\/p>\n<h2 style=\"margin: 0px; padding: 0px 0px 8px; border: 0px; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; line-height: 18px; vertical-align: baseline; color: #000000; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;\"><span class=\"ez-toc-section\" id=\"Passing_token_data_via_the_Javascript_API\"><\/span>Passing token data via the Javascript API<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">E.g. if your tokens were<\/span><code class=\"inline\" style=\"margin: 0px; padding: 0.25em; border: 1px solid #cccccc; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 23px; vertical-align: baseline; letter-spacing: 0.01em; color: #333333; background-color: #f8f8f8; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">[[user]], [[place]] &amp; [[gender]]<\/code><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">,<br \/>\n<\/span><\/p>\n<p><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">Add this extra parameter in the javascript API,<\/span><del><\/del><\/p>\n<p><code class=\"inline\" style=\"margin: 0px; padding: 0.25em; border: 1px solid #cccccc; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 23px; vertical-align: baseline; letter-spacing: 0.01em; color: #333333; background-color: #f8f8f8; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">notify_visitors.tokens = {'user':'', 'place':'', 'gender':''};<\/code><\/p>\n<p><a href=\"https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-8353 size-full\" src=\"https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png\" alt=\"Admin NotifyVisitors\" width=\"1007\" height=\"184\" srcset=\"https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png 1007w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png 300w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png 768w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png 370w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png 270w, https:\/\/cdn3.notifyvisitors.com\/blog\/wp-content\/uploads\/2014\/06\/Admin-NotifyVisitors1.png 740w\" sizes=\"(max-width: 1007px) 100vw, 1007px\" \/><\/a><\/p>\n<h2 style=\"margin: 0px; padding: 0px 0px 8px; border: 0px; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: bold; line-height: 18px; vertical-align: baseline; color: #000000; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;\"><span class=\"ez-toc-section\" id=\"Filter_clickthroughs_based_on_token_data\"><\/span>Filter clickthroughs based on token data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"color: #555555; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;\">Every time users, on your website, click on the Notification&#8217;s call-to-action button, we record the click and also persist the token data (realized values) for that user. This data is presented back to you in the analytics section wherein you can filter clicks based on the token value.<span class=\"Apple-converted-space\"><br \/>\n<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dynamic Notifications offer you a nice way of showing highly personalized messages or offering by adding dynamic text such as username, dynamic discount value etc.<\/p>\n","protected":false},"author":1,"featured_media":9777,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3],"class_list":["post-11","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-integration","tag-dynamic-notification"],"_links":{"self":[{"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":17,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":12478,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions\/12478"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/media\/9777"}],"wp:attachment":[{"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nvecta.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}