Plugin for PHP


Got WordPress? Please use our WordPress Plugin. If not, this page will give you instructions for a generic PHP installation.

Installation Instructions

First, grab the software from the software download page.

The file you download will have a name similar to Unzip that file, a folder named analytics-connect-php-2.X.X will be created.

The contents will be a folder named analyticsconnect-io and two files named example-thank-you.php (an example of a thank-you page with the code properly installed), and readme.txt (which contains a reference to this help page).

Open the analyticsconnect-io folder, and then open the config.php file with a text editor. You'll need to enter your secret key (available on your settings page) as seen in the below example.


//  Paste your secret key into the next line between the single quotes

$analyticsconnectioSecretKey = 'YOUR_SECRET_KEY_GOES_HERE';


Save your changes, and close the file.

Once that's done, upload the analyticsconnect-io folder with all of its contents to the root of your website via FTP.

Now that the software is installed, we just need to call it from your thank-you page. For demonstration purposes, I'll assume your thank-you page is named thank-you.php and that this file is in the root of your website. You'll need to add the following code to that page to fire our software.

require 'analyticsconnect-io/analyticsconnect-io.php';

The best place to insert that is right before the </body> tag inside your HTML (as seen in the included example-thank-you.php file).

Please be sure Infusionsoft is passing the orderid variable to your thank-you page (this is the default Infusionsoft behavior).

To see what's happening, do a "View Source" on your thank-you page and search for "". You'll see something similar to the following (depending on your options) as an HTML comment block.

<!-- WordPress Plugin v2.3.0 -->
<!-- - Google Analytics Ecommerce Data --><!-- TEST MODE for UA-XXXXX-Y --><!-- account status = active -->
<!-- - AdWords Data --><!-- TEST MODE for id=(not set) label=(not set) --><!-- Disabled -->
<!-- - Facebook Data --><!-- TEST MODE for (not set) --><!-- Disabled -->
<!-- - Bing Data --><!-- TEST MODE for (not set) --><!-- Disabled -->

You'll also be able to see events in real time from inside your Google Analytics account. Go to the "Reporting" tab. Click on "Real-Time" inside the left sidebar, and then on "Events". Then select "Events (Last 30 min)" for "Viewing". Our software writes data under the "Event Category" of "". To see event history, including errors, go to the "Reporting" tab. Click on "Behavior", then "Events", and then on "Overview". From there you can click on "" to see details.

Advanced Configuration Options

How to setup the Cookie Vault.

For other advanced configuration options, please read our API Documentation.

Article Feedback

If this article is incorrect or outdated, or omits critical information, please use our contact us form and let us know.

Get Help