drupal_set_NEXT_html_head or drupal_set_NEXT_footer_code

Christoph C. Cemper - October 12, 2006 - 21:41
Project:Drupal
Version:4.7.3
Component:theme system
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I am currently struggling to get all sorts of small Javascript code snippets into a live drupal
platform for doing conversion tracking with Google Adwords, MSN Adcenter and such

All of these system need to display a piece of Javascript/Image tag
that allows them to track the "conversion"

- i.e. after the "Thanks for your message" was displayed
- i.e. after the "Thanks for your order" was displayed by a custom module
- i.e. after the user has re-logged in and confirmed his e-mail after signup

currently I'm just using the drupal_set_message to buffer that javascript code together with the result message, resulting in a working conversion tracking

However some, e.g. Google Adwords, also display some kind of "tracked by google" logo
that is pretty displaced in the middle of the status message box

now my idea was to implement a similar buffering function for sending stuff to the NEXT page to be displayed, just as drupal set message works

Any clues on other approaches for this?
What's best practice here?

Thanks,
Christoph

#1

Arto - October 14, 2006 - 21:41
Category:feature request» support request
Priority:critical» normal
Status:active» closed

I think you'd be much better off posting this, and similar general questions, in the forums, where more eyeballs would have a chance to see it.

However, if I correctly understand what you want to do, you can achieve that with the $_SESSION variable which persists across page requests. Take a look at the source for drupal_set_message() for an example of how to manipulate it.

(While this was not really a feature request, please do note that the 4.7 branch won't be implementing any feature requests, only bug fixes, so I'm marking this issue as closed.)

 
 

Drupal is a registered trademark of Dries Buytaert.