WordPress Plugin Help
The Confection can be easily installed and used as a WordPress plugin. It can be found at the official WordPress Plugins Repository. You may install and update it directly from your site's dashboard.
- Install the plugin as you would any other. For more information check the official instructions from WordPress Codex.
- After activating the plugin, go to the admin menu titled "Confection".
- Fill your Account ID number in the proper field.
- Choose your privacy settings and check the Install Sitewide option to automatically call Confection in all pages.
That's all. Your WordPress' site is now ready to capture user information.
Using the Sitewide option, Confection will call the script in every page using the wp_footer() hook. But there are situation where you will want to install Confection manually in some specific pages. To do so, you will need to use the shortcode [confection-plugin-scripts].
You may use the shortcode in any page or field where you can use shortcodes. This shortcode can be called multiple times, but it will only invoke the script once, to avoid issues and duplicity in tracking.
Confection will automatically track form fields, submitting any data user input in form fields to Confection. Form fields are treated as Personal Identification Information.
Confection allows you to submit custom events through shortcode. This means that you can submit to Confection any Non-PII as Custom Events.
To do so, you just need to use the shortcode [confection-event event="event_name" value="event_value"] at any time. The shortcodes variables are:
- event : The field name or event name. Default value "pageview"
- value : The field value or event value.
Shortcode example for submitting a pageview event with static value:
[confection-event event="pageview" value="https://example.com"]
[confection-event event="pageview" js_value="window.location.href"]