How can we help?

Exporting Submission Data

By adding the Cordial JavaScript Listener to your Web Forms account, you are able to seamlessly import lightbox form submission data into Cordial. The knowledge base article Capturing submission data explains how to do this. To export your website visitor data out of Cordial, you can utilize the Contact Activities Export API.

Here is a sample API payload for the POST /contactactivityexport endpoint.

{
	"name": "export_lightbox_submitted",
	"exportType": "csv",
	"destination": {
		"type": "aws"
	},
	"showHeader": true,
	"selected_timeframe_start": "2019-03-01T00:00:00.000Z",
	"selected_timeframe_end": "2019-03-31T23:59:59.999Z",
	"selected_action_name": "lightbox_submitted",
	"showAllProperties": false,
	"compress": false,
	"columnHeaders": [{
			"name": "properties.analytics.VARS.date_of_visit",
			"label": "Date"
		},
		{
			"name": "properties.analytics.form_submit_data.email",
			"label": "Email"
		},
		{
			"name": "properties.analytics.form_submit_data.first_name",
			"label": "First Name"
		},
		{
			"name": "properties.analytics.form_submit_data.last_name",
			"label": "Last Name"
		},
		{
			"name": "properties.analytics.form_submit_data.opt_in",
			"label": "Opt In"
		},
		{
			"name": "properties.analytics.lightbox.lightbox_short_id",
			"label": "Lightbox ID"
		},
		{
			"name": "properties.analytics.lightbox.lightbox_name",
			"label": "Lightbox Name"
		},
		{
			"name": "properties.analytics.lightbox.variation_short_id",
			"label": "Variation ID"
		},
		{
			"name": "properties.analytics.lightbox.variation_name",
			"label": "Variation Name"
		},
		{
			"name": "properties.analytics.lightbox.ab_test_short_id",
			"label": "AB Test ID"
		},
		{
			"name": "properties.analytics.lightbox.ab_test_name",
			"label": "AB Test Name"
		},
		{
			"name": "properties.analytics.VARS.web_source",
			"label": "Web Source"
		},
		{
			"name": "properties.analytics.VARS.search_engine",
			"label": "Search Engine"
		},
		{
			"name": "properties.analytics.VARS.page_visits",
			"label": "Page Views"
		},
		{
			"name": "properties.analytics.VARS.past_visits",
			"label": "Past Visits"
		},
		{
			"name": "properties.analytics.VARS.current_page_url",
			"label": "Submit Url"
		},
		{
			"name": "properties.analytics.VARS.referring_website_url",
			"label": "Referring Url"
		},
		{
			"name": "properties.analytics.VARS.landing_page",
			"label": "Landing Url"
		}
	]
} 

This api payload creates an export job within the Cordial platform. This job generates a csv file that can be downloaded from the Cordial jobs interface. The csv file generated by the export job will include data for all lightbox associated events that occurred during the month of March 2019.  The CSV will include the following columns:

  • Date
  • Email
  • First Name
  • Last Name
  • Opt In
  • Lightbox ID
  • Lightbox Name
  • Variation ID
  • Variation Name
  • AB Test ID
  • AB Test Name
  • Web Source
  • Search Engine
  • Page Views
  • Past Visits
  • Submit URL
  • Referring URL
  • Landing URL
Note: The API payload can be modified to specify which columns and data points are present in the export file.

Comments

0 comments

Please sign in to leave a comment.