Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using _agile.set_email() doesn't seem to backtrack web visits #16

Open
mbaxter91288 opened this issue Apr 26, 2017 · 2 comments
Open

Using _agile.set_email() doesn't seem to backtrack web visits #16

mbaxter91288 opened this issue Apr 26, 2017 · 2 comments

Comments

@mbaxter91288
Copy link

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:

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

@graut
Copy link
Contributor

graut commented Apr 28, 2017

Hi @mbaxter91288 ,

Could you please confirm you have kept Agile CRM analytics code at each side. If not you have to kept.

Now suppose at website C.HTML you have register contact to Agile CRM and here you are settings email (cookies)

So first time only at C.HTML page viewing will be shown. Then After any page (A.HTML, B.HTML or C.HTML) you visit it will show respective page browsing status.

Please share your video snapshot in case you need further information.

Thanks

@mbaxter91288
Copy link
Author

Hi @graut,

Thanks for getting back to me. Not sure I fully understand you response, however:

The Agile CRM tracking I can confirm is on all pages. For testing, I have a very simple page setup. I've cleared all cookies and refreshed the page and once page is loaded, I have the following cookies:

  • cv1daof0q1a36otjibaqf59lgf-agile-crm-guid
  • cv1daof0q1a36otjibaqf59lgf-agile-crm-session_id
  • cv1daof0q1a36otjibaqf59lgf-agile-crm-session_start_time

I then navigate to multiple pages, confirming the above cookies are still present. Once I return to the homepage, I submit my simple form, which, upon form.submit() calls the _agile.set_email function using the email passed in the form.

Once the page reloads, I now have the following cookie as well:

  • cv1daof0q1a36otjibaqf59lgf-agile-email

Then, logging into my Agile dashboard, I can see my new contact record and look into "Web Stats" and only see one visit to the homepage.

If I then navigate to the /about page, that continues to track successfully, however, still no previous web history.

Hope that helps.

Regards,
Mat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants