< Back

New enhancement: Extended in-page JavaScript APIs

New enhancement: Extended in-page JavaScript APIs Headshot

By David Henderson, CTO

New enhancement: Extended in-page JavaScript APIs - featured image

Fresh Relevance now has improved client-side APIs to better support Single Page Apps (SPAs), Progressive Web Apps (PWAs) and modern JavaScript web frameworks such as React, Vue.js and Angular.
 

Why have we made this enhancement?

These changes have been made to provide enhanced support for SPAs, allowing you to pass behavioral and product data directly to the Fresh Relevance script and receive notifications when the script performs certain actions. 

This enhancement will also reduce dependency on the detection of page transitions and collection of product information from the page HTML. 
 

What’s new?

We’ve implemented new event emitters from the Fresh Relevance script. These will allow you to react to events raised by the script, for example when each element of personalization is about to be inserted, or all personalization is complete. 

New hooks have also been added so that your script can inform us when events have occurred within your app. An example use case would be when the user navigates from a product list page to a product details page. With the new hooks, you can let us know and pass through details of the product on the page as a JavaScript object. 

New enhancement: Extended in-page JavaScript APIs Headshot

By David Henderson

CTO

As CTO at Fresh Relevance, David leads the dev team. He has been instrumental in designing, building and scaling the platform to help marketers get awesome results by driving sales growth and strengthening customer engagement.