Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Google adwords tracking and Silverstripe


Go to End


9 Posts   3027 Views

Avatar
steve_nyhof

Community Member, 224 Posts

26 October 2009 at 9:32am

Edited: 26/10/2009 9:34am

I did it in a better way. I used an iframe, gave it a name which the (nested iframe page) form page gets the value from the iframe tag. This is the best of all worlds because now my clients can simple enter an iframe anywhere on the landing page and pass the value of the iframe name to the aweber account.

The iframe tag
<div align="center"><iframe src="form1.php" name="trackingname" width="600" height="560" frameborder="0" scrolling="no"></iframe></div>

The form1.php file
<script language="JavaScript" type="text/javascript">
//alert(window.name);
//document.write(window.name);
var t = (window.name);
document.writeln('<INPUT TYPE="hidden" name="custom t" value="', t, '">');
//.......
</script>

Nothing is needed on the main parent page. I changed the code a long time ago to allow iframes on my pages - no problems.

Go to Top