(2) Change the links from the main site to the secure site to use _link as follows. Please note that your analytics tracking code and
calls to _gat._getTracker (shown in Step 1) must be placed on the page above the call to _link. If your current links look like:

You are adding it in the wrong place.
This code takes details from a form or another page and then creates a new link to a page where the details get updated
(seems like a pretty strange way of doing it...but there you go...)
You would need to go back a step to the page that calls this and add it in there.

I would, except that the form action calls the PHP page listed above, NOT the 3rd party shopping cart.

Unless you are saying that the PHP page that passes the info from front site to 3rd party shopping cart will also pass info back to GA. I don't see that it does, without the GA javascript being on that page, or there being PHP script is adjusted to do the same.

I thought that the GA code needed to be on every page in order to track correctly. If there is a page in the chain that do not have the code then the info is not passed on that page, thus breaking the chain.

If you put the javascript code above that will fail too as you can not put any text out before a header command unless you use buffer. You can enable this in php.ini or by using the
ob_start();
and
ob_flush();
commands

Featured Post

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP. PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…