Flywheel MA supports website monitoring by using a small snippet of Javascript code. This will allow you to be notified about specific page hits.
This document will review the usage and implementation of this system.
Basic Setup:
Step 1 : Enable CORS
CORS allows different websites to communicate with each other. Browsers requires us to explicitly give permission before this sharing can occur. This is done to prevent harmful code from being run on your browser.
Log in to Flywheel MA and navigate to Configuration -> System Settings and scroll to the CORS Settings.
Enter the URL for any websites that will have the Tracking Code installed.
For example, if your website is at "https://thinkflywheel.com", then enter this into the box. Be sure to include the "https://". If you are serving secure and insecure content, then enter a line for both your "http" and "https" urls.
You only need to include the base url (ie "https://thinkflywheel.com") not subpaths (ie. "https://thinkflywheel.com/about-us").
Create a record for any subdomains that you may be using (ie. https://app.thinkflywheel.com)
Step 2 : Generate Code
Flywheel MA generates a code snippet that is unique to your instance.
Navigate to Configuration -> Tracking Settings
Set Identify visitor by tracking url to Yes
Set Identify visitor by device fingerprint to Yes
Set Anonymize IP to No
Copy the code in the grey box.
Step 3 : Insert Code in your Website
Your web developers need to insert this code onto any/every page that you would like to have tracked.
The code must be placed within the "<body> </body>" tag. Usually it is placed at the very end, right before the closing tag.
Most commercial platforms (Wordpress, Bigcommerce, etc) provide a User Interface to accomplish this. It is often in the same area where you might apply things like Google Analytics tracking code.
After this is applied, Flywheel MA should begin to track each time someone visits these pages.
What does it do?
When a person visits a page that has the Flywheel MA tracking code applied, MA will place a cookie on that persons browser. MA will be notified each time that person views one of your applicable pages.
At the beginning, the person will be anonymous and will not be synced to CRM or other Flywheel Apps.
If the person fills out a form or engages in another identifying behavior, then Flywheel MA will update their record with the identifying information and it will sync throughout.
A few examples of identifying activities include:
1. Filling out a form
2. Visiting a tracked page via a link from a Flywheel MA email
You may also create identifying events through your website. See the advanced configuration below for details.
Advanced Setup:
If your website is sophisticated and has the ability to identify users, you may utilize this to share that information with Flywheel MA.
For example, an eCommerce website may have information about customers (when they log in or start a checkout).
In these scenarios, you may pass additional information in the Tracking Code javascript.
The 3rd parameter of the `mt()` function accepts a json-encoded data. The keys should match fields in Flywheel MA, and the values should be provided by your application.
For example:
mt('send', 'pageview', {email: 'my@email.com', firstname: 'John'});
For Company fields, append 'company' in front of the field name.
The Flywheel MA tracking code also has a few additional features such as an onload and onerror callbacks. For more information, please reach out to support@thinkflywheel.com