Client using AdRole...the easiest way to implement?

RevConceptRevConcept Member
in Help edited May 2013
My clients are setting up AdRoll for conversion tracking etc.

Since the checkout/receipt pages are in HTML, how can I pull the "conversion value in dollars" as outlined in this documentation?

----SAMPLE FROM ADROLL----

During the rendering of the thankyou page, the Web Framework used for the shopping cart/checkout must add the
following HTML code:

<script type="text/javascript">
adroll_conversion_value_in_dollars = 100.12
</script>

When our pixel fires, if the adroll_conversion_value_in_dollars JavaScript variable has been set, our
pixel will pull that value through into the system for you.
A simple example in PHP would be:

<html>
<head><title>Thank you</title></head>
<body>

<?php $conversion_value_in_dollars = 100.12; ?>

<script type="text/javascript">
adroll_conversion_value_in_dollars = <? echo $conversion_value_in_dollars ?>;
</script>
Comments
  • fc_adamfc_adam FoxyCart Team
    @RevConcept,

    It depends on the version your store is using - if using 0.7.2 or older, you'd use this:
    ^^receipt_only_begin^^
    <script type="text/javascript">
    adroll_conversion_value_in_dollars = ^^order_total^^
    </script>
    ^^receipt_only_end^^
    

    on 1.0 or newer, you can do this:
    {% if first_receipt_display %}
    <script type="text/javascript">
    adroll_conversion_value_in_dollars = {{order_total}}
    </script>
    {% endif %}
    


    By wrapping it in the receipt_only/first_receipt tags, it means that the conversion is only tracked once, on the first time the receipt is loaded.
Sign In or Register to comment.