I am trying to find out whether it is possible to pull Google Analytics source info (direct/organic/referrer etc) and include that in the email that is sent to us when someone enquires on our website.

We have a large account management team for an incredibly high average order value product, currently when someone makes an enquiry on our website, an email is sent to all our account managers with the contact details of that person for them to follow up accordingly - there is no automatic integration into our CRM system.

To minimize the margin for human error (and having to ask each prospective client where they heard of us) I'd like to include as much of the source information as possible in the email that is sent to our account managers.

Is this possible? If you have experience and are willing to take this on as a project please send me a private message.

  • Jack have you thought about using Open Web Analytics which you can host on your own domain. Get IP and Host information from each visitor plus your campaign data? If the product you're selling is expensive all this information can be useful. Since you may be using a custom app to send the emails the answer below is right gather the fields with PHP and simply add them to the email being sent out
    – Anagio
    Commented Jan 3, 2013 at 3:55
  • Thanks Anagio, we have a tracking service running that collects that information too. I will work on implementing the hidden fields with PHP. Commented Jan 3, 2013 at 10:39

1 Answer 1


Jack, which CRM system are you using? Generally these do have some kind of a service to integrate webforms. However, if you want this data in an email, and you are using custom forms, then you can use the Google Analytics utmz cookie instead.

What you do is this -

In your enquiry form have a hidden input element which has the value of the utmz cookie (if you are running on a PHP based platform, then the value for it would be in $COOKIES["_utmz"])

This value is the original traffic source by which the visitor came to your site the first time. Inside this cookie, you will find a set of values which might give your marketing team insight on which keywords and campaigns are working for your site.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.