Instant opt-in YouTube video by Joey Keller

@joeyk I am assuming this is your YouTube over at Update: Instant Double Opt-in with Mautic (3 Methods) - YouTube.

I set up the way you described in the video and it working for me but I got a question or two.

I noticed that there is a bunch of invisible contacts with ip address on it no names or no email addresses.

It turns out that whenever any devices visit the confirmation page, either a live person, a bot or search engine, it will generate a contact card with just only their ip address.

I had to keep deleting those blank contact cards from the contact database.

Is there a way to prevent this happening?

See attached screenshot -

These are the contacts assigned to the segment.
Please show segment and campaign settings

There is no campaign yet …

I am just setting up an opt in to assign a btg tag to those that sign up for the Bridge the Gap newsletter with a tracking tag on the confirmation page when they click on the link in the confirm email address.

This is the string I use on confirmation page where members opts-in their email address

<img src="https://***********.org/mtracking.gif?email=<? echo $_GET['email'];?>&tags=BTG">

Here the segment setting I set up to add those contact with the tags into the segment.

But it still adding blank contact with ip address when the confirmation page is hit by someone without a link from email or from a bots.

Here a screenshot log when I go visit the page confirmation page. without a link from email. (my ip address edited out)

It seem it will create a new contact just by visiting the page with blank email and name. I could be wrong

It does not appear in the contact list and. remain invisible however it does appear under the segment’s contact counts and contact list.

Only 3 shown in contact list - those are for testing purpose …It not on live production yet that why it only have 3 contacts.

There are total of 11 contacts in the segment with btg tag … 8 of them have ip address only and it is hidden but it annoying to see it being counted when there is 3 with email and name attached to it while 8 are blank with ip address only.

I can only guess it being created whenever a bot or someone discovered the page without the confirmation link.

I could be wrong about all this.

Originally I made 2 videos. The first video explains how to use a double optin procedure. It is relying on clicks in emails rather then visits in landing pages. The second one (the one you referring to) shows how to do without waiting for cronjobs. And yes, it has the disadvatage of passing the tag to any visitor. You can restrict that by only passing valid emails:

<? if(isset($_GET['email'])) {
echo "<img src='https://***********.org/mtracking.gif?email=".$_GET['email']."&tags=BTG' />";
}; ?>
1 Like

Thank you!

I will try this out. I can see with IF statement that it should prevent it but I will report back either result.


Hi, Did you use this with GrapesJS?
i try use this code with GrapesJS

	<? if(isset($_GET['email'])) {
echo "<img src='https://**********/mtracking.gif?email=".$_GET['email']."&tags=Status:%20Active,-Pending%20Email%20Confirmation' />";
	}; ?>

when I save the page and reopen it I get:

  <!--? if(isset($_GET['email'])) {
echo "<img src='https://**********.com/mtracking.gif?email=".$_GET['email']."&tags=Status:%20Active,-Pending%20Email%20Confirmation' /-->";
  }; ?&gt;

and not working (


I did not have time to watch entire video but I think separate php script was created on website he is trying to track/get the info from.

The reason you get the above output after save is because your are copying the php code to editor that does not expect it (grapeJS). Your input is escaped for security reasons.

Also I would advise you use <?php /*code here*/ ?> tag to enclose php code since short tags might be disabled by configuration.

Hope it helps somehow.

i try use full tags - also not working (

The code was for Wordpress or other php app. What are you exactly trying to do?

I am making a subscription confirmation page inside mautic using grapesjs and trying to insert your php code there

Don’t do it. You can’t run php code inside of grapejs. It was an example for third party builders


Has there been any change to this with compose version Mautic?

I deleted the Mautic and I did a fresh install using compose then add the new tracking number to the page but it no longer tagging new contact on new fresh install of Mautic using compose.

This is what I am using on my “Confirmed web page”

<? if(isset($_GET['email'])) {
echo "<img src='".$_GET['email']."&tags=BTG' />";
}; ?>

It still not tagging new contacts on my new mautic. I watched the video a couple of time and looked at my previous mautic but I can’t find any different between the two installation.

Is there an extra step for compose installed mautic?

Thank you

Not that I know of.
I didn’t take a deep dive in it yet, so I can’t have a strong opinion :slightly_frowning_face:

It just odd that it stopped working after I change over mautic to compose installation. There are no error message anywhere or in browser console.

Are you using compose installed Mautic with instant opt in?

I stripped out the script in confirm page and re-typed the script on the page. Seems to be working now …

Hopefully, that fixes it.

Now it stopped working …

sigh …

There had to be something asmissed … I am not sure if I am missing something or not after reinstalling Mautic using compose instead of standard compressed files.

I checked your tracking gif, seems to be working.

I know …

It works sometime and it does not work sometime … just strange …

Do you think it have something to do about me testing it on the same computer with same browser but different email address?

I am using
<? if(isset($_GET['email'])) { echo " ;}; ?>
to prevent bot filling up my contact list.

We think we may know what going on because there were other area that our Mautic was having issue at like the segment contact etc.

When we lift the function restriction on some of the function like shell_exec, the segment filtering start working again so maybe the same restriction was breaking this too.

Thanks for all you do!

It seems once the contact have confirmed then later deleted from Mautic. THat contact can no longer be re-tagged again if they fill out the form and click the confirmation link to direct to a page with the javascript to be assigned a tag.

When we deleted a contact then that contact can no longer opt in even if they go back and fill out the form again then click the link in email to go to the confirmation page. The tag will no longer assign to contacts that been deleted.

I already emptied the cache on Mautic and my browser also cleared the cookie. I was deleting contact to run the test again but it seems that once it been tagged before then it can never be tagged again after it been deleted.

Is there a way to reset that contact for testing purpose?