I'd like to use aMember to track affiliate's pay per click campaigns... So I've added 3 new fields in aMember: Adwords AdCenter Overture ... And I'd like to have that data passed to the /template/footer.html page to properly track conversions. Can you show me how to pull the tracking information from the 3 fields so that any of my affiliates (who populate the Adwords, AdCenter, or Overture fields) have their tracking code show up on the thank you page? Cheers, Markus Allen
Sorry, how shoud these fields by filled-in and with which values? I don't understand question, please provide some samples how it works.
Sure... ... For example, let's say you're an affiliate of my site -- assigned Member ID# 49... so I created a new field called 'Adwords_Track'... and I manually filled it with Member ID# 49's Adwords 'var google_conversion_id' tracking code... let's say 1071644344. All we need to do is populate the tracking code with some Smarty variable like {$Adwords_Track} and {$payment.amount} (to post the value of the sale)... for example: Code: <script language="JavaScript" type="text/javascript"> var google_conversion_id = {$affiliate.Adwords_Track}; var google_conversion_language = "en_US"; var google_conversion_format = "1"; var google_conversion_color = "666666"; if (1) { var google_conversion_value = {$payment.amount}; } var google_conversion_label = "Purchase"; </script> <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/{$affiliate.Adwords_Track}/?value={$payment.amount}&label=Purchase&script=0"></noscript> So in my example above, aMember would populate the JavaScript with: Code: <script language="JavaScript" type="text/javascript"> var google_conversion_id = 1071644344; var google_conversion_language = "en_US"; var google_conversion_format = "1"; var google_conversion_color = "666666"; if (1) { var google_conversion_value = 19; } var google_conversion_label = "Purchase"; </script> <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/1071644344/?value=19&label=Purchase&script=0"></noscript> With this setup, I'm able to precisely track any of my affiliate's pay per click campaigns -- a VERY valuable service... thereby attracting better affiliates to my program. By the way, I'm using 2.3.8PRO. Does this help?
Ah, OK. replace var google_conversion_value = {$payment.amount}; to var google_conversion_value = {/literal}{$payment.amount}{literal}; and it will work.
Unfortunately, I get this error when I use the {/literal}...{literal} command: Code: Fatal error: Smarty error: [in footer.html line 1]: syntax error: unrecognized tag '/literal' (Smarty_Compiler.class.php, line 551) in /home/xxxxxxxx/public_html/amember/smarty/Smarty.class.php on line 1102 I also switched the coding around... for example: {literal}...{/literal} ... And that generated a similar error. Should I create a help desk ticket?