# confection-wp-plugin
Confection WP Plugin. Controls output here: https://confection.io/poc/alpha/


# shortcodes list

- pageview event `[confection-event]`
- custom event `[confection-event event="event-name"]`

- `[confection-script-test]` - Will display buttons for triggering multiple analytics services and two consoles, one for the analytics services and another one for the confection output.

- `[confection-forms-selector]` - Will display a form selector to output the selected form from the service.

- `[confection-forms-console]` - Will display a console to reflect the submissions to Confection API made by form events.

- `[confection-api-console]` - Will display a console and a button to query the current UUID against Confection API to retrieve all it's data. Accepts the parameter `endpoint` which will target the desired API endpoint. By default, it will be the basic endpoint which only returns IP, Email, Browser and Created Date.

    Currently we have 2 more endpoints in the API:
    
    `related` - which will show the related UUIDs: `[confection-api-console endpoint="related"]`
    
    `full` - which will show all events and confettis captured: `[confection-api-console endpoint="full"]`

- `[confection-plugin-scripts endpoint="basic"]` - Will load all the scripts need for all the shortcodes above. It should be inserted after all the other shortcodes. Should only be used in pages where the `wp_footer()` function isn't used. Endpoint parameter can be any API endpoint related with UUID.
