URL API

Allows you to call public JS API methods when you open a site page with a specific get parameter.

Get request structure:

convead[<method>]=<type> – name of the method with its type (required parameter)
convead[properties][<name>]=<value> – object with event properties
convead[visitor_info][<field>]=<value> – visitor_info object with visitor data

The substituted variables correspond to the variables in the JS API:

<code><code>convead('<method>', '<type>', <properties>, <visitor_info>);

Examples of custom event calls:

<code><code><a href="http://site.com/?convead%5Bevent%5D=custom&convead%5Bproperties%5D%5Bkey%5D=event_key&convead%5Bvisitor_info%5D%5Bemail%5D=mail@example.net">http://site.com?convead[event]=custom&convead[properties][key]=event_key&convead[visitor_info][email]=mail@example.net</a><br><a href="http://site.com?convead%5Bwidget%5D=show&convead%5Bproperties%5D%5Bid%5D=123<br>http://site.com?convead%5Btrack%5D=disable" rel="nofollow noopener noreferrer" target="_blank">http://site.com?convead[widget]=show&convead[properties][id]=123<br>http://site.com?convead[track]=disable

Analog of calling these methods via JS API:

<code><code>convead('event', 'custom', {key: 'event_key'}, {email: 'example.net'});<br>convead('widget', 'show', {id: 123});<br>convead('track', 'disable');

There is an updated syntax for calling multiple methods through the API URL at the same time:

<code><code><a href="http://site.com/?convead%5Bwidget%5D%5B0%5D%5Baction%5D=show&convead%5Bwidget%5D%5B0%5D%5Bproperties%5D%5Bid%5D=1762&convead%5Bevent%5D%5B1%5D%5Baction%5D=update_info&convead%5Bevent%5D%5B1%5D%5Bvisitor_info%5D%5Bemail%5D=mail@example.net">http://site.com?convead[widget][0][action]=show&convead[widget][0][properties][id]=1762&convead[event][1][action]=update_info&convead[event][1][visitor_info][email]=mail@example.net</a>

Analog of calling these methods via JS API:

<code><code>convead('widget', 'show', {id: 1762}); convead('event', 'update_info', {}, {email: '<a href="mailto:mail@example.net">mail@example.net</a>'});

Using the URL API allows you to transfer the values of the ConveadSettings object:

<code><code><a href="http://site.com/?convead_settings%5Bdisable_auto_widgets%5D=true&convead_settings%5Bdebug_mode%5D=true">http://site.com?convead_settings[disable_auto_widgets]=true&convead_settings[debug_mode]=true</a>

Analog transfer of the values via JS:

<code><code>ConveadSettings.disable_auto_widgets = true;<br>ConveadSettings.debug_mode = true;
		
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us