This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# snippet 'snippets/nosto.rain' #} | |
{% set account = 'ACCOUNT-ID-HERE' %} | |
<script type="text/javascript" src="//:my.nosto.com/include/{{ account }}" async></script> | |
{% if page.cart %} | |
<div class="nosto_external_visit_ref" style="display:none">{{ page.cart.quote_id }}</div> | |
{% endif %} | |
{% if order %} | |
<div class="nosto_external_visit_ref" style="display:none">{{ order.information.quote_id }}</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if($couponCode) | |
<br><br> | |
Here's your personal coupon code that you can redeem on your next purchase | |
<br><br> | |
Coupon: <strong>$couponCode</strong> | |
#if($couponExpiry) | |
<br> | |
Valid Until: <strong>$couponExpiry</strong> | |
#end | |
#end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<p style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; font-size: 16px; line-height:1.5;">$!intro.paragraphText | |
#if($couponCode) | |
<br><br> | |
Here's your personal coupon code that you can redeem on your next purchase | |
<br><br> | |
Code: <strong>$couponCode</strong> | |
#if($couponExpiry) | |
<br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On search results page, apply tagging below: | |
<div class="nosto_search_term" style="display:none">OUTPUT_USED_SEARCH_TERM_HERE</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nostojs(function(api){ | |
api.listen("postrender", function(NostoPostRenderEvent){ | |
console.log(NostoPostRenderEvent.filledElements); | |
console.log(NostoPostRenderEvent.unFilledElements); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nostojs(function(api){ | |
api.listen(<position>, <your callback function>); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Push customer information for current visit, if not present in tagging | |
nostojs(function(api) { | |
api.customer({ email: "foo@bar.com", first_name: "Jane", last_name: "Doe" }); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ajax product page view - call after product rendered on screen with nosto tagging html | |
nostojs(function(api) { | |
//OR IF product page view was initiated from nosto-element, add the nosto element's id | |
api.loadRecommendations(“nosto-categorypage-1”); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ajax product page view - call after product rendered on screen with nosto tagging html | |
nostojs(function(api) { | |
//product page view was initiated from shop’s own product listing | |
api.loadRecommendations(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use case: recommendation with add to cart button | |
// call from button's clickhandler | |
nostojs(function(api){ | |
api.reportAddToCart("productId1", "nosto-categorypage-1"); | |
//if you also want to update the recommendations you can call | |
api.loadRecommendations(); | |
}); |
NewerOlder