Call focus item via button click

Your software
My Mautic version is: 3.3.2
My PHP version is: 7.4
My Database type and version is: 5.7

Your problem
My problem is: I’m trying to call a Mautic focus item via a button click on a home page (typo3).
Is this possible? How can I call the function via onclick event?

Steps I have tried to fix the problem:
I added the Mautic script:

<button type=“button” class=“btn btn-danger btn-lg” onclick="{mautic type=“focus” id=“2”}">Register

Thanks for your ideas

We had a similar idea just the other day and was not able to call it either, so interested to see if there is a solution here.

My Mautic version is: 3.3.3
My PHP version is: 7.4.19
My Database type and version is: PHP version: 7.3.27

I’m struggling with a similar issue. Basically, a 1 pager WP/Divi site and have an anchor set up as a custom menu item " #page". was thinking the trigger would be https://example/#page.

When to engage set to “upon arrival” at “0 sec”

but no luck so far

Hi @jtourgee are you able to get any pop ups ?

What is the script you using. I have found that the standard script generated is generally missing https at the begining and also index.Php after your base domain

Hey @taxi I am really not sure about how it is called or if I fully understood your reply. If you do get it to work I would be very interested to understand how as well

, I didn’t solve it, just kicked it down the rd for another time and went with static form instead. it would pop up but seemingly only randomly. I was also attempting multiple focus items on the same page for #section1,#section2 etc. they did not work as i’d hoped either. only one focus item would show up and not on the (CSSID#anchored) page jump. no doubt i’v gone beyond my coding paygrade…

1 Like


after investigating again after quite a time, I found a kind of solution.

The script is included as suggested within the tags:

The button calls the function:

This calls the focus item.

Unfortunately it is only working if the focus item is set to:
When to engage?
Upon arrival

Timeout before engage
MUST be greater then 1 ore more integer sec.

How often to engage?
Every page

And here is the handicap.
I can’t just start the page without any focus item and trigger it only when the button is clicked.
The settings for the focus item have to be set as shown above.
For my page this is annoying because the focus item appears after 1 sec of loading and blocks the page from reading. This means, the visitor has to click the “x” to get rid of the focus item window, then read the page and if he clicks the button, the focus item appears again.

Ideal would be to trigger the focus item window regardless of the settings made with the focus item.

Any other suggestions or solutions are very welcome!

Kind regards


1 Like

Would it work with exit intent timing ? or only Upon arrival

First of all I say a BIG THANK YOU for the new release of Mautic! You’re doing such a great job! I love this tool!

In the new Mautic Version 4.2 I have seen the feature of adding scripts.

Landing Pages Script

It is now possible to add scripts to landing pages in the head or footer - for example tracking scripts, focus items and so forth.

Does this solve my issue calling a focus item via button click? Has anybody already tested this?

Kind regards