When a user subscribes to a newsletter, I'd like to record this fact in Google Analytics as well as where they subscribed from (e.g. was it whilst registering? Did they register with the website and then subscribe afterwards from /mailchimp/subscribe?) and I was wondering where I should start to build this functionality (or, indeed, whether you would consider adding this functionality into this module?).

I'm guessing that I'd have to add something into the function mailchimp_subscribe_auth_form_submit at the very minimum, but I don't know how to tell Drupal what query string parameters to add when the user submits the form (i.e. after the user has registered, I'd like the URL they get redirected to to be something along the lines of http://www.example.com/?utm_source=registration&utm_medium=web&utm_content=subscribed&utm_campaign=user_registration).

Or would this functionality be better off in a separate module?

Any advice or help anyone may be able to offer would be much appreciated.

Thanks in advance,
Steve

Comments

levelos’s picture

Status: Active » Closed (won't fix)

This would have to be done as a GA event, using their JS SDK.