-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi there,
I use a PHP CMS called October CMS and I have created a form plugin. Upon a user submitting this form, I use the REST API to add a contact, and optionally add them to a campaign. This is all working perfectly.
I would like to track the user's previous web visits. Based on your documentation, it sounds like this should be possible.
Anonymous users are tracked and backtracked when a user email is added using set_email.
I validate the form with Parsely.js and listen for the submit event, then get all the inputs, find the email input and then use the agile set email function:
$.listen('parsley:form:submit', function(e) {
var inputs = e.$element.serializeArray();
for (var i = 0; i < inputs.length; i++) {
if (inputs[i]['name'] == 'email') {
console.log(inputs[i]['value']);
_agile.set_email(inputs[i]['value']);
}
}
});
This works as I then get a notification within Agile telling me the new user is viewing my page, however, it hasn't backed tracked their views. For example:
- visit http://www.plugindemo.local/
- visit http://www.plugindemo.local/about
- visit http://www.plugindemo.local/test
- visit http://www.plugindemo.local/
- I then submit the form on the homepage
- after form submission, I get redirected to the homepage
I look at the contact record in Agile and I only see 1 visit to the homepage.
It seems to then continue to track web visits as you'd expect, just doesn't do the backtracking.
Please advise.
Regards,
Mat