Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google Analytics module


Guest

Recommended Posts

I'll probably work on the Analytics module next week in order to get it to work with ecomm transaction values and so on. Anyone interested in helping out please PM me, thanks.

 

 

Sorry man I'm crap at programming but I'll definatly use it :)

 

Good on ya champ!

 

J

Link to comment
Share on other sites

  • Replies 389
  • Created
  • Last Reply

Top Posters In This Topic

just installed this great contribution! conversion tracking seems to be working but session variables arent being passed into analytics (i.e., referral source, keywords, etc). does anybody have an idea of why this is the case?

 

mad props to all the great programmers out there that support this project and this forum! Thanks!

Link to comment
Share on other sites

just installed this great contribution! conversion tracking seems to be working but session variables arent being passed into analytics (i.e., referral source, keywords, etc). does anybody have an idea of why this is the case?

 

mad props to all the great programmers out there that support this project and this forum! Thanks!

 

I just finished installing and configuring Analytics. Exceptional product, working perfectly with this exceptional contrib.

 

I was wondering about the sessions, just like you: there is a setting in Google.

Go to Main Website Profile Information, Edit

 

you will see a field that reads: Exclude URL Query Parameters. Just enter Oscsid (or the name of your session id that shows up in your urls.

 

don'y forhet to check the e-commerce option (I left that off for a week :-)

 

Enjoy this great tool!

Edited by pixclinic
Link to comment
Share on other sites

I just finished installing and configuring Analytics. Exceptional product, working perfectly with this exceptional contrib.

 

I was wondering about the sessions, just like you: there is a setting in Google.

Go to Main Website Profile Information, Edit

 

you will see a field that reads: Exclude URL Query Parameters. Just enter Oscsid (or the name of your session id that shows up in your urls.

 

don'y forhet to check the e-commerce option (I left that off for a week :-)

 

Enjoy this great tool!

 

So the whole thing is working perfectly for you guys now? This is the same build that was giving so many posters above trouble... did you do anything differently?

Link to comment
Share on other sites

I have had the analytics module up and running about a week now. In the beginning everything seemed to work fine - both basic tracking and e-commerce tracking. However doing a closer analysis I discovered that not all transactions are included in the e-commerce stats. The conversions provided by the basic tracking seems to be perfectly ok.

"include(DIR_WS_MODULES . 'analytics/analytics.php'); " is installed just above the </body> tag, and the basic tracking code above this again.

 

Anyone has an idea why this is happening?

Link to comment
Share on other sites

I just finished installing and configuring Analytics. Exceptional product, working perfectly with this exceptional contrib.

 

I was wondering about the sessions, just like you: there is a setting in Google.

Go to Main Website Profile Information, Edit

 

you will see a field that reads: Exclude URL Query Parameters. Just enter Oscsid (or the name of your session id that shows up in your urls.

 

don'y forhet to check the e-commerce option (I left that off for a week :-)

 

Enjoy this great tool!

 

hey pixclinic,

thanks for the tip! just applied it and hopefully it will make a difference. out of curioisty, are you using the "purchase without account" contribution on your site?

thanks!

-v

Link to comment
Share on other sites

Installed this and setup in google, but says "tracking not installed" as if it can not get to the page I have specified "mysite/etc....checkout_success.php"

 

I installed the script on my regular html page to track just my non store page and it is 'waiting for data'.

 

So how do I get the ecomm part of analytics to see my scripts I installed?

Link to comment
Share on other sites

hey pixclinic,

thanks for the tip! just applied it and hopefully it will make a difference. out of curioisty, are you using the "purchase without account" contribution on your site?

thanks!

-v

 

I have to take it back. I now have this problem of e-commerce not showing up: I got 4 orders tracked the first day I activated e-commerce, then it stopped working (visits still work fine though). Don't understand??

 

And no, I don't use the purchase without account option. I deactivated it and found some nice text explaining why customers have to register. www.thefrenchybee.com

Edited by pixclinic
Link to comment
Share on other sites

GREAT NEWS: E-COMMERCE TRACKING - HOW TO MAKE IT WORK.

 

 

 

After weeks of trial an error, here is how I finally made it work.

All the directions provided below reflect the configuration that finally suvessully displays transactions.

Please note I don't know exactly what caused e-commerce not working, but what I provide here is a configuration that works - and it's all what matters, doesn't?

 

A) OS COMMERCE SETTINGS:

 

the TRACKING CODE: (rerplace xxxx-x with your account number)

 

<?php
			// osCoders.biz - Analystics - start
			/*
			Conditional code added thank to  rrodkey and bfcase
			IMPORTANT -- IMPORTANT - IMPORTANT
			You'll need to update the "xxxx-x" in the samples (twice) above with your own Google Analytics account and profile number. 
			To find this number you can access your personalized tracking code in its entirety by clicking Check Status in the Analytics Settings page of your Analytics account.
			*/
			if ($request_type == 'SSL') {
			?>
			 <script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
			 </script>
			 <script type="text/javascript">
			   _uacct="UA-xxxxx-x";
			   urchinTracker();
			 </script>
			<?php
			} else {
			?>
			 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
			 </script>
			   <script type="text/javascript">
				_uacct="UA-xxxxx-x";
				urchinTracker();
			 </script>
			<?
			}
			// osCoders.biz - Analistics - end
			?>

 

is implemented in EVERY page from the CATALOG (or ROOT) page that you want to track just before the <HEAD> tag. I initially installed - by pure laziness but also because it made sense - in my header.php, but since this file is not embeded in the <HEAD> tag, it can make a difference.

You may decide not to install it not-so-important pages like "cookie_usage.php" or "privacy.php" if you don't mind tracking these for example... I put it everywhere anyway.

 

The e-commerce transaction code that goes in the checkout_success.php, is inserted at the end of the file, like suggested:

 

<?php 
// osCoders.biz - Analystics - start 
	include(DIR_WS_MODULES . 'analytics/analytics.php'); 
// osCoders.biz - Analistics - end
?>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

B) GOOGLE SETTINGS:

 

1) profile information: Of course, "e-commerce Website" must be checked in ":-)

I initially put Oscsid in "exclude URL query parameters". e-commere is now working since I removed it.

NB: I didn't say it was the source of the problem, my entire configuration just works with this left blank.

 

 

2)Conversion Goals & Funnels: I defined one goal

a) Goal information

- my goal is called "purchase complete" and its URL for my shared SSL connection is:

https://secure19.prohosting.com/~axxxxxx/ch...out_success.php?

 

and I checked "active goal" : on

 

b) Define funnel (optional): I defined a funnel below this: (the checkbox "Required step" is left unchecked)

https://secure19.prohosting.com/~ axxxxxx/checkout_shipping.php?

https://secure19.prohosting.com/~ axxxxxx/checkout_payment.php?

 

c) Additional settings:

- "Case sensitive" is left unchecked

- "match type" select HEAD MATCH

- Goal value: enter the number zero (0)

 

3) Filters Applied to profile: I tried to applyu a filter to avoid having my visits logged, but noticed that my transaction are displayed since I removed it. NB: I didn't say it was the source of the problem, my entire configuration just works with this left blank.

 

Let me know if you successfully record transation with these settings!

 

Hugh

Edited by pixclinic
Link to comment
Share on other sites

Did you intentially mean to say above the <HEAD> tag??? Is that the difference, or did you mean to say </HEAD> as per the instructions????

 

 

my mistake: it was above the </head> tag: the code must be between <head> and </head>

 

one last thing: I had a javascript that deactivated right click to minimize image theft, that was in the footer: I removed it as well. I heard that google might be picky about being next to other scripts

Link to comment
Share on other sites

  • 2 weeks later...
*sigh* I'm new to both OSC and PHP so I'm a little bit lost .

 

Can anyone help me and produce a list of recommended files to add the google analytics general code to?

:blush:

Where is this contrib anyway???

I searched for it in the contribs and found a page but nothing there:

Link I used

I too am a bit lost.

Anyone out there help us "not so learned about osCommerce as yet" ?

Thanks in advance!

Link to comment
Share on other sites

:blush:

Where is this contrib anyway???

I searched for it in the contribs and found a page but nothing there:

Link I used

I too am a bit lost.

Anyone out there help us "not so learned about osCommerce as yet" ?

Thanks in advance!

 

The link you have is correct. I don't know what you mean by "nothing there"... this is where I downloaded from. Please explain if your problem is to understand how to download a contribution, as I have no idea what kind of experience you may have in this domain.

 

Please note you must have a Google analytics account with Google in order to use this contrib. They provided limited availability for this tool, registartion were closed a long time ago.

Link to comment
Share on other sites

*sigh* I'm new to both OSC and PHP so I'm a little bit lost .

 

Can anyone help me and produce a list of recommended files to add the google analytics general code to?

 

Ideally, all the .php files which are in the catalog directory, from "account_edit.php".... to " tell_a_friend.php"

Link to comment
Share on other sites

The link you have is correct. I don't know what you mean by "nothing there"... this is where I downloaded from. Please explain if your problem is to understand how to download a contribution, as I have no idea what kind of experience you may have in this domain.

 

Please note you must have a Google analytics account with Google in order to use this contrib. They provided limited availability for this tool, registartion were closed a long time ago.

Hi,

Thanks for the reply... :thumbsup:

I do have Google Analytics, was just invited last week, so onward with adventures in Google Analytics in osCommerce...

My problem turned out to be Internet Explorer 7.

It wasn't working properly at the time I accessed the Google Analytics contrib page.

No download links displayed at that time.

Shutdown my computer and returned to the contrib page just before writing this post...

VIOLA!

The contrib links were all appearing!

Appreciated your response but I guess my problem should have been posted in an IE 7 forum. :blush:

It sometimes just gets all funky acting but mostly runs well...lol

Link to comment
Share on other sites

Hi all..

 

I started using google analytics a few days ago. I didn't use this contrib.. I'm using STS and just inserted the code as directed by google before the /body tag in my templates.. and it worked fine.. apart from the security pop up bar on explorer for secured pages.

 

So I guess this is the problem that this contrib overcomes? Or is it designed for more than that?

 

Why do you put the code in the head tag when google says body tag?

 

has anyone used with STS 4?

 

Thanks!

Link to comment
Share on other sites

Hi all..

 

I started using google analytics a few days ago. I didn't use this contrib.. I'm using STS and just inserted the code as directed by google before the /body tag in my templates.. and it worked fine.. apart from the security pop up bar on explorer for secured pages.

 

So I guess this is the problem that this contrib overcomes? Or is it designed for more than that?

 

Why do you put the code in the head tag when google says body tag?

 

has anyone used with STS 4?

 

Thanks!

 

yes the code is adapted to work on secure and non secure pages, it checks the referer and points to a google secure or non secure url depending on what page of your oscommerce site is calling it.

 

regarding embeding in the head tag, I played with several locations, some didn't seem to work when it came to have the e-commerce tracking in place. You may try to leave your code in the body and install the converion in your checkout_success.php page, the transaction tracking might work.. or not.

Mine works perfectly now, I won't take the chance to change anything :-)

Link to comment
Share on other sites

yes the code is adapted to work on secure and non secure pages, it checks the referer and points to a google secure or non secure url depending on what page of your oscommerce site is calling it.

 

regarding embeding in the head tag, I played with several locations, some didn't seem to work when it came to have the e-commerce tracking in place. You may try to leave your code in the body and install the converion in your checkout_success.php page, the transaction tracking might work.. or not.

Mine works perfectly now, I won't take the chance to change anything :-)

Thanks for the quick reply!

Link to comment
Share on other sites

  • 1 month later...

@pixclinic

 

does your configuration store the keywords, referrals which lead to a conversion?

 

I'm having the same "prob" with a shared SSL proxy server. Google suggests in this case the third-party-shopping cart solution (whose description is a bit confusing)

But as soon as the customer logs into his account (means as soon as the SSL proxy is called) the tracker forgets all the session variables like referral and keywords, etc.

 

Does anyone have a solution for this ?

 

Euromann

Link to comment
Share on other sites

@pixclinic

 

does your configuration store the keywords, referrals which lead to a conversion?

 

I'm having the same "prob" with a shared SSL proxy server. Google suggests in this case the third-party-shopping cart solution (whose description is a bit confusing)

But as soon as the customer logs into his account (means as soon as the SSL proxy is called) the tracker forgets all the session variables like referral and keywords, etc.

 

Does anyone have a solution for this ?

 

Euromann

 

Referals are stored, yes.

But the only referals showing non-null conversion rates in my case are my domain name and the shared SSL provided by my host. I need more time and need higher PR to track the keyword aspect.

 

By the way, when you define your purchase goal to the checkout_success.php, a good idea is the enter the

STEM of the url instaed of the full one. Refer to help>tracking central>troubleshooting tracking>why isn't goole ytacking my goals, and take a look at the paragraph called: "you're using an exact match..."

 

I entered today /checkout_success\.php? as my goal URL instead of the absolute one. Let's see if it makes a difference..

 

 

OsCommerce cannot be defined as a third party shopping cart: it runs on the same server as the site itself, and even if we have a shared SSL, the end of the URL is the same and we should be able to show the same data to the tracker.

 

Let me know if you see a difference after this

Edited by pixclinic
Link to comment
Share on other sites

But the only referals showing non-null conversion rates in my case are my domain name and the shared SSL provided by my host.

 

 

just like in my reports :( (+ Paypal referals of the customers who paid with Paypal)

 

I will give it a try with the stem and keep you up to date.

 

I've also asked the support about this 3 days ago, but no answer yet

 

Euromann

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...