Mautic Community Forums

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