Version 3 of the NUVIAD Conversion tracking code introduce support for conversion tracking of multiple campaigns in the same web page and is also optimized compared to the previous version.
In order to track user conversion in your website/landing page, you'll have to consider the two following steps:
- Store the user information when the user first visits the page.
- Report a conversion to NUVIAD after the user finish the process or at least a step in the process (it's totally up to your use-case).
You'll be able to implement two different tracking codes for these two steps, or a single code which combines them together (store the user information and also report a conversion at the same code).
Store user information when the user visits the page:
The following code is the basic implementation of the NUVIAD tracking SDK and without it, your conversion code can't identify the user.
Report a conversion:
This code reports a conversion to NUVIAD with an optional "stage" parameter.
Replace `YOUR_CAMPAIGN_ID` with the ID of the relevant campaign and `YOUR_STAGE_ID` with a unique identifier of the relevant stage in your conversion funnel (the step identifier is limited to 25 characters). the stage identifier will later be part of your reports.
Note that depends on the value of `NUVIAD_CAMPAIGN_ID`, the code reports a conversion to a single or multiple campaigns. in order to report a conversion to multiple campaigns (depends on the session stored in the user's browser), all you need to do is put a list of campaign IDs comma-separated as the value.
By default, you can report a conversion from your website/landing page only for users who clicked on your ad - we call this flow "Post-click conversion".
There're cases when you want to track a conversion of users who didn't click on your ad from the first place but only viewed one of the ads within your campaign - we call this flow "Post-view conversion".
Enable Post-view conversion
In order to enable Post-view conversion tracking within your campaign, you'll have to create a code ad, which can be done using the NUVIAD dashboard or via the NUVIAD API.
The content of your ad (the code) will have two parts:
The code to display your ad
The main part of the code should contain the actual ad to be displayed to users.
For example, use the following code in order to display an image ad (first you should upload the image somewhere):
Our tracking code version for Post-view conversion (almost the same as our basic tracking code, but with a little difference):
That's it! after this step, your campaign is ready to collect Post-view conversions. now all you need to do is to put the tracking code on your landing page as described in  and start collecting conversions like a rockstar!