railroad / lead-tracker
Tracks email form submissions and marketing data for visitor origins.
Installs: 62 209
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- doctrine/dbal: ^3.0
- laravel/framework: ^11.9
Requires (Dev)
- orchestra/testbench: ^9.2
- phpunit/php-code-coverage: ^11.0.1
- phpunit/phpunit: ^11.0.1
README
Tracks email form submissions and marketing data for visitor origins.
How It Works
- A potential customer clicks a link in one of our marketing emails or an ad which sends them to a lead gen page on one of our sites. The URL will generally have tracking info in the parameters. Examples:
http://www.drumeo.com/faster?utm_source=facebook&utm_medium=cpc&utm_campaign=ZFWFS&utm_term=Z1_01&utm_content=story1
https://www.pianote.com/shop?utm_source=maropost&utm_medium=email&utm_campaign=digital&utm_term=pianists&utm_content=shop
- When the customer enters their email and submits the form, they should be added to maropost and tagged accordingly. A new row in the tracking table should also be created with the data that was in the URL. Table columns:
id
email
maropost_tag_name
form_page_url
form_name
utm_source (can be empty)
utm_medium (can be empty)
utm_campaign (can be empty)
utm_term (can be empty)
The system
In order to do this the form needs to read from the URL and add that data as input info for the form.
We will use middleware to capture the normal requests which only create and tag a maropost contact. The forms POST to here so we'll capture that request by configuration and create the row first using this package:
/maropost/form/sync-contact
The request should have the following input variables:
email (required)
maropost_tag_name (required)
form_name (required)
utm_source (can be empty)
utm_medium (can be empty)
utm_campaign (can be empty)
utm_term (can be empty)