To track things like a download of a PDF document, there is no actual page on your website on which to place a conversion. In these cases, you may want to use an onclick event to measure when the document is downloaded.
Creating an onclick conversion in LeadsRx
- Go to the gear icon at the top right and choose SETTINGS.
- In the CONVERSIONS section, select Manage.
- Select the Track a Conversion button.
- Name the conversion, and set the conversion type to API or upload for how you want it to be measured.
- Don't forget to SAVE changes at the bottom right of the screen.
- Locate your new conversion from the list and click the View conversion scripts link.
- Use OPTION 1 if you will not be passing user data. Otherwise, you can use OPTION 2.
- Copy the code and attach it to an "onclick" event on your website (e.g. a PDF download) to trigger a conversion.
The button clickEvent() can be any name as long as it matches the function. The <script> will need to be at the bottom of the page below our LeadsRx Universal Tracking Pixel script and above the </body>.
Generic Example:
<button onclick="clickEvent();">Click me</button><script type="text/javascript"> function clickEvent() { _lrx_sendEvent('conversion', ENTER CORRECT CONVERSION ID HERE); }</script>