0

We have Facebook users that come to our website, and we need to count their purchases as the number of conversions.

for example, we have the following URL with parameters:

http://domain.com/pdppage?utm_source=Facebook&utm_medium=Facebook+Ads&utm_campaign=GoBat+Summer+2016

But when it goes to checkout and success page all the parameters will go away, I tried to create a session and set the variable, when I log the variable I can see that I have it, however, I need to show it on success page, so that It can be recorded on the Google Analytics, I was wondering maybe I should get an observer to observe the parameters, store them in session and then if user purchased an item show the parameters in the success URL. However, I do not know what kind of observer can do it. Here is what I did instead,

in product detail page I have the following: app\design\frontend\enterprise\scosche\template\colorswatch\view.phtml

Mage::getSingleton('core/session')->setMyparams($this->getRequest()->getParams());

then In the success page and checkout I did the following: app\design\frontend\enterprise\scosche\template\checkout\success.phtml

 Mage::getUrl('checkout/onepage/success',Mage::getSingleton('core/session')->getMyparams());

but how to make the success page to have the parameters in the browser? I don't think redirecting the page is a good idea.

1

you don't need the parameter on further Pages. Google Analytics checks the parameter on the first page hit and saves it in cookies.

If you don't see any Conversion, maybe your Trackingcode has a bad implementation

  • But I want to track if a user bought an item. – Nickool Aug 19 '16 at 18:43
  • Then you have to implement the Google Analytics E-Commerce tracking. developers.google.com/analytics/devguides/collection/… If you implemented the required Data on the checkout success Page, Google Analytics will do the rest by its own. – Pawel Aug 19 '16 at 18:46
  • we already have google analytics implemented, and we already have statistics. However, we only have problem with Facebook conversions we called google and they told me that I should still keep the parameters to be counted in purchase page. – Nickool Aug 19 '16 at 18:51
  • do you see other transaction in GA? Whats with other Campains, except FB? – Pawel Aug 19 '16 at 19:33
  • Yes.I do see that.I even see for facebook but they tell me its not correct. Pinterest is one – Nickool Aug 19 '16 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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