Actions in Mailocator
Controlling Mailocator with Actions opens up a number of options for modeling your campaigns
What are Actions?
In addition, it is possible to chain actions, for example, to ensure that after successful submission of the form, the window closes itself in the selected number of seconds.
Actions can be written directly to the source code or by the user in the Designer.
How it starts?
onclick
on buttons and images.To process the form, the actions are associated with the
onsubmit
event. When writing to the source code, you must add a call to the
mailocator.action.do ()
action to the event and specify one or more actions in parentheses.For example, to close a window, you can add an
close
action to an HTML element by typing:onclick="
mailocator.action.do('close')
"
Add Action in Designer
Select an elementIn the palette, select the symbol for Actions (Event)
Choose an action and confirm by clicking on the "Add action" button
Chaining Actions
|
.For example, the "submit form content and close pop-up after three seconds" action looks like this:
onclick="
mailocator.action.do('subscribe|close:3')
"
Overview of supported Actions
You can get a valid list, including the correct parameters, in Scenarios in the drop-down menu of a specific object, for example, the following list of actions is displayed for pop-ups:
Alphabetical overview of Events:
close
closes the current object and this object will no longer be displayedclose:[int]
closes the current object in secondscloseID:[int]
closes the object defined by the campaign identifier X (for example from an external script etc.)closeCampaign:[string]
closes the object defined by the trigger type (for example 'POPUP')consent
confirmation of consent to cookies (cookie consent)destroySession
deletes the user's session, including cookies (anonymization occurs)disable
turns off the Mailocator engine for the given user sessiondisableID:[int]
switch off camapign identified by given IDenable
turns on the Mailocator engine for the given user session, if the engine was turned off by the action disable
expand
expand the CTA
or FEEDBACK
object to its full sizefeedback
sending and saving the results of the feedback questionnairega:[string]
sends the specified event to Google AnalyticsisConverted
mark campaign as succesfully convertedhide
removes the object from the page, but the object can be displayed again (unlike close
)nexstep
if a multi-step pop-up is created in Designer, it takes the user to the next step in a rownextstep:[int]
moves the user to the step defined by the sequence number displayed in the Designer (back or forward)reset
obnoví setting the session to its original state as if the user had taken no action and no conversion had taken placesetCampaign:[string]
calls the campaign by name for use in other actions that are called from external scripts.E.g.
mailocator.action.do (setCampaign: popup | close)
switches the campaign context to POPUP and closes the currently open pop-up.setval:[input_name],[input_value]
set value of input, make radio checked or checkbox checked setval:[checkbox_name]
subscribe
submits the form for processingsubscribe:1
submits the form for processing and waits for the resulttriggerID:[int]
forces the campaign to run by numberurl:[url]
go to the specified URLvalidate
real validation of an email address, detection of typos etc.Validation must be enabled in Mailocator Settings, otherwise each syntactically correct address is considered valid.