Monetate JavaScript API FAQ
general how safe is the monetate tag for the rest of my site? both the asynchronous docid\ zcx p3d6nd2rr5bjloyug and synchronous docid\ zcx p3d6nd2rr5bjloyug versions of the monetate tag and all other static assets, including actions and assets uploaded to the monetate platform, are all built automatically and served from the akamai content delivery network (cdn) akamai uses its own private fiber links to distribute this content around the world to its edge locations its redundant dns system directs a visitor to the nearest location the following scenarios describe what happens if akamai experiences an outage if akamai nodes malfunction, then they're taken out of the rotation a site visitor still receives the monetate tag but from another location if the entire akamai dns malfunctions, then the dns query fails and the browser continues to load the rest of your site if an akamai node isn't taken out of the rotation but is unreachable or refuses connections after a malfunction and the failover system hasn't noticed it yet, the node returns an error code and the rest of the site loads normally only two failure modes could result in your site potentially hanging in a site visitor's browser the first occurs when the dns query works, and the allocated akamai node is still functioning and accepts connections but fails to return any content the second could occur when a firewall drops connections to this host, but akamai is used for a significant portion of online services to date monetate hasn't observed either of these failure modes within akamai's systems akamai delivers a worldwide (and in many instances, redundant) service, and any failure on its part would actually prevent many high profile sites (including a portion of other tags and services that are on your site) to stop functioning as well what value does the monetate javascript api offer? the monetate javascript api is an open source library of methods docid 8 pibhgi1sdhozswfgw5w that pass data from your site to monetate and enable a more robust set of core features where should i install the monetate javascript api? you can install the monetate javascript api method calls docid 8 pibhgi1sdhozswfgw5w in a number of places within your contracted domain(s), but you must decide where you want them configured monetate recommends a use case–driven approach to determine what data you want to pass to the monetate platform for example, the addcartrows docid\ y wcmrn 146quote7njft method passes the products that a customer adds to the cart to monetate passing this information then lets you target customers who have in the cart a specific product or one or more products from a specific product category do i need to use every method in the monetate javascript api? no, you don't you only need to implement the api methods for the monetate features that you want to use on your site refer to method calls and monetate features unlocked docid 8 pibhgi1sdhozswfgw5w for features and their corresponding api methods is the monetateq object persistent? no, it isn't the monetateq docid\ jt7o1lq8autjhfolknlnv object must be defined on every page furthermore, any values pushed into the object are sent to monetate and cleared once a trackdata docid\ gcm0h169gurcqmv6sbota call occurs how does the clearing of the monetateq object impact variables defined within the object? you can send the monetateq docid\ jt7o1lq8autjhfolknlnv object properties and values to monetate multiple times on a page however, ensure that any methods you use are defined and resent with each trackdata docid\ gcm0h169gurcqmv6sbota call because the monetateq object is emptied after each trackdata call what does trackdata do when data passes to monetate? each instance of trackdata docid\ gcm0h169gurcqmv6sbota on your site's page sends the contents of the monetateq docid\ jt7o1lq8autjhfolknlnv object that are defined by each of your site's api calls to monetate can i use multiple trackdata calls on a page? you can use multiple trackdata docid\ gcm0h169gurcqmv6sbota calls on a page however, doing so is only necessary for specific use cases in which content doesn't exist on the page when the initial call to trackdata occurs multiple trackdata calls on a page are known as retracks docid\ z7zs1bulqpt 0z1coyhww any time you use multiple trackdata calls on a page, you should populate other methods previously defined so that monetateq docid\ jt7o1lq8autjhfolknlnv data is complete and consistent for example, you want to create a custom target using target builder https //docs monetate com/docs/targets , but the html element that you want to use doesn't exist on the page during the initial page load to create this custom target, you can add a retrack to the page that takes place after the element you want to use exists on the page when should i send addcartrows multiple times? the data passed to monetate with the addcartrows docid\ y wcmrn 146quote7njft method must match the products in the cart during each trackdata docid\ gcm0h169gurcqmv6sbota call to facilitate accurate targeting for example, if a customer removes a product from the cart, then your site must call addcartrows again followed by another call to trackdata to pass the updated list of products in the cart what is a mini cart collect? a mini cart is a persistent cart that tracks items on pages of a site that aren't the cart page itself a mini cart collect occurs when your site populates the addcartrows docid\ y wcmrn 146quote7njft method on each page on which the mini cart appears a mini cart collect allows for additional targeting and conditional statements within monetate what's the difference between addconversionrows and addpurchaserows? the addconversionrows docid 1j1lqhnzrckamahpz79il method generates a purchase id the addpurchaserows docid\ fnv9uukqmkglidpgca 5z method uses a product catalog's internal purchase id how do i send monetate a product catalog if i'm using the monetate javascript api? after you create a product catalog schema https //docs monetate com/docs/create a product catalog dataset schema , you can update a product catalog using the monetate data api https //developer monetate com/data api monetate and ecommerce connectors to a certain extent, ecommerce connectors and the monetate javascript api are similar the monetate javascript api is a series of method calls that pass data from your site to monetate and is required for the monetate platform to work an ecommerce connector is open source baseline code that configures the monetate javascript api on your platform what value does an ecommerce connector offer? an ecommerce connector allows you to easily pass data to the monetate javascript api through your ecommerce provider's platform should i use the api or an ecommerce connector to pass my data to monetate? the method you use depends on your site's ecommerce platform monetate generally recommends using the api to implement your site, but you may be able to use a connector if you're using the default configuration of your platform otherwise, stick to the monetate javascript api to pass data to the monetate platform for more information contact your services representative or submit a support ticket using the does monetate perform any quality assurance measures on my site's monetate javascript api or connector implementation? no, monetate doesn't perform any qa work for the data you pass through the monetate javascript api or ecommerce connector however, it can assist you with general troubleshooting for monetate javascript api issues you must manage any qa work internally see qa pages docid\ qosi4y5g5z9mw5vtlu pc to learn about qa best practices what does the monetate tag do? when you place the monetate tag docid\ zcx p3d6nd2rr5bjloyug on your site, either manually or with an ecommerce connector, it fetches the script to execute monetate's functions and features on that site you can then configure the monetate javascript api and your ecommerce connector to pass data back to monetate with that script i don't see my ecommerce platform can i still use it with monetate? you potentially might be able to do so monetate has developed several ecommerce connectors with partners if your platform doesn't currently have a connector, then you must use the monetate javascript api for more information contact your services representative or submit a support ticket using the whom do i contact about any issues i encounter while using an ecommerce platform connector? all the monetate ecommerce platform connectors are built on a standardized implementation of your ecommerce platform if you have trouble installing the connector, check with your systems integrator to verify if any customizations were made to your implementation if you continue to have trouble, submit a support ticket using the what qualifies as an ecommerce platform connector customization? any change to the file structure, script library, or any other deviation from the typical platform implementation is considered a customization can monetate implement the ecommerce platform connector on my platform? no, it cannot monetate can complete the process of adding the relevant method calls to your site for an additional fee, but it cannot utilize an ecommerce platform connector for you how often does my ecommerce platform connector generate and send a product feed file to monetate? you can configure ecommerce platform connectors with the option to automatically provide product feed files to send the product feed as frequently as you want monetate tag what can't i do with just the tag? the monetate tag docid\ zcx p3d6nd2rr5bjloyug alone doesn't allow you to track conversions, behavioral interactions, or site structure (for example, page types) these are incredibly important when you implement any personalization program use monetate javascript api method calls to unlock full functionality see method calls and monetate features unlocked docid 8 pibhgi1sdhozswfgw5w for a complete list of things you can do on your site and related requirements how many tags do i get if i have multiple domains? each domain or account in your contract receives two tags a production tag and a development tag both tags function exactly the same way with one exception the development tag does not store historical data because the development tag does not store historical data, the platform does not collect analytics for development accounts use the development tag in all lower environments where you want to use monetate so that you do not use the production tag in an environment that doesn't have real user traffic you can easily copy any work on experience or action development from tag to tag as well, so there's no duplication of effort if you prefer to build experiences in a lower environment for testing before moving them to production retracks what is a retrack? monetate evaluates experience and action eligibility on each trackdata docid\ gcm0h169gurcqmv6sbota call that is made on a page typically this call is deployed natively on the page and triggered on each page load if you need to serve content adjustments without a page load, you must add a retrack docid\ z7zs1bulqpt 0z1coyhww retracks are used to send page updates to monetate that may occur without a new page load here are the steps of a retrack create the window\ monetateq object docid\ jt7o1lq8autjhfolknlnv push relevant api methods into that object, such as setpagetype docid\ smkhqb02vpvms rhqi3iw , addproductdetails docid\ zlbul8ibxhdealdjwtmus , or addcartrows docid\ y wcmrn 146quote7njft send data to monetate using trackdata the following are some common scenarios and retrack solutions for an add to cart button that adds an item without triggering a page load, use addcartrows in a retrack to pass cart details for a quick view button that shows product details without triggering a page load, use addproductdetails to pass product details when updates to item color or size selections on a product details page don't trigger a new page load, use addproductdetails to pass updated product details for a single checkout page that calls new forms onto the page (typically using ajax docid\ z7zs1bulqpt 0z1coyhww ) without triggering a new page load, use setpagetype for cart, shipping, and billing pages for a lazy loading index page on which new products are called onto the page, trigger addproductdetails to send all product ids now present on the page on scroll the monetateq object is emptied on each trackdata call, so you must include all relevant api methods to pass the page attributes you want to evaluate in the trackdata call do retracks impact the average page views metric in analytics? each trackdata docid\ gcm0h169gurcqmv6sbota call made to monetate through the api or a custom integration built by monetate registers as a page view (it also triggers the viewpage event in the monetate inspector tool https //docs monetate com/docs/install the monetate inspector browser plug in ) therefore, if more than one trackdata call happens on a single page, page views may be inflated in the platform's internal analytics you can use an optional {'nonpageview' true} parameter for the trackdata call to prevent it from counting as a page view example trackdata call with nonpageview parameter // example track window\ monetateq push(\[ "trackdata", { "nonpageview" true } ]); the optional {'nonpageview' true} parameter defaults to false see page retracks docid\ z7zs1bulqpt 0z1coyhww for more information about retracks what is a rollback? a rollback is functionality that can be added to a domain implementation that removes actions that have already been served to a page when a retrack docid\ z7zs1bulqpt 0z1coyhww occurs without triggering a new page load it rolls back the action from the page