Caspio Submission Forms can be configured to capture the user tracking information used by Google Analytics. This way you get statistical information that pertains directly to “active” site users. Google Analytics also offers a tool to create URL’s tagged with additional information so you can monitor the efficiency of individual online campaigns.
This solution is adapted from the article Integrating Google Analytics with CRM posted on the Justin Cutroni’s Analytics Talk blog.
Before you apply the solution presented below, make sure you already have created a Submission Form and you are familiar with Google Analytics and their terminologies.
Steps to log Google Analytics information in new record submissions:
1. Add the following 7 fields into your table
New fields must be added to the base table of the Submission Form for which you are configuring Google Analytics. Navigate to the Tables listing and select your Submission Form’s base table. Click Design to open the table in design view. Add the following 7 fields. The data type should be set to Text(255). Click Save.
2. Add the fields to your Submission Form
- Navigate to the DataPages listing, select the Submission Form, and click Edit.
- Next, you add the newly added fields into your Submission Form. Move all of the Google Analytics fields to the right-hand panel using the arrow button.
3. Insert header and footer sections
On the Configure Fields screen, you insert Header & Footer sections. Click the Insert button at the lower right-hand corner of the DataPage Elements panel. Select Header & Footer to insert these sections.
5. Deploy the code into your HTML page
6. Test the Google Analytics Fields
Once the Submission Form has been edited and configured, you can now test the Google Analytics Fields.
- Click Preview of the Submission Form you have just modified. The Google Analytics fields should be populated with some data. The data within Caspio Bridge may not be accurate, but if some data appears, you know the fields are functioning.
- If you have a webpage that is indexed by Google you can also test by embedding this DataPage in the indexed webpage. Go to Google, search, and click through to that webpage. When you arrive the DataPage should indicate Google as the GA_Source value, and also indicate the search term you used in GA_Term.
- If you do not have a page indexed by Google, just embed the DataPage and then go directly to the site. The Source should read as “(direct)”.
7. Hide the Google Analytics Fields
Once you are sure that the form is receiving data you can edit the DataPage again. Edit the Submission Form and on the Configure Fields screen, select each of the Google Analytics field and set the Form Element dropdown to Hidden.
Now whenever a user submits the form, these fields will be automatically populated with the Google Analytics data.
Create Specially Formatted Analytics Links
To better analyze your website traffic you can create specially formatted links that will provide information directly to these Google Analytics fields. Google provides an online tool to create a special URL that you can use in your online promotions.
To fully take advantage of Google Analytics, sign up for a free account here: http://www.google.com/analytics/. You will receive a few lines of code that must be added to your web page headers.