You can integrate the Axon Pixel in any native JavaScript site or JavaScript framework. It may require more work to integrate the Axon Pixel in this way than (for example) with the Axon Google Tag Manager or the Shopify app, so you should only do this if your site cannot use an integration method like those.
You will find the process of integrating the Axon Pixel resembles other pixels you may have integrated in the past.
You can debug and validate your Pixel installation using the Axon Pixel helper Chrome Extension.
To use the Axon Pixel on your site, take the following steps:
You install the Axon Pixel code in a different manner depending on whether the pages on your site are a set of HTML files or if they are generated from a common template as in React or React-like sites:
If your site is a set of individual HTML files, copy and paste the following code into the <head> subsection of every page of your site:
If you have a React or React-like site, rather than inserting this code manually into each of your pages, you can create a component for the Pixel and add it to your main container (such as App.jsx or App.tsx) like this:
[COMPONENT: Helmet]
); };
[COMPONENT: AxonPixel]
); };
You can find your Axon event key in the Account > General > Keys section of the AppLovin dashboard.
Send events throughout your site when they occur. See Axon Pixel events and objects for details about the standard event types.
For example, the following code sends a purchase event:
Before you begin, ensure that you have write access to your site’s source code.
This code must execute on each page of your site.
Send events only after the component on which you initialized the Pixel mounts on your site.