- Intro to Custom Clicks via HTTP Post
- How to Format Custom Clicks for HTTP Post
- How to Review Custom Clicks in Wicked
- FAQ's
Intro to Custom Clicks via HTTP POST
When you want to record a Custom Click into a Contact's customer journey, there are a few possibilities to accomplish this: CSV, HTTP Post, Zapier, or API. This article focuses on uploading Custom Clicks via HTTP Post.
Here are some examples of when you would want to upload a custom click:
- Scenario #1 - Attributing Historical Leads
Case: You have several leads that you personally tracked prior to joining Wicked Reports, yet Wicked was unable to track these due to our tracking script not yet being set up. By default, Wicked will attribute these leads as "UnAttributed" new leads. However, if you know the source that originally generated these leads, then you can pass through Custom "NEW_LEAD" Clicks.
- Scenario #2 - Attributing Orders
Case: You have several orders that have gone unattributed for some reason. However, you know which clicks drove the sale of those orders. In this case, by adding the Custom "LAST_CLICK" attribution, you could attribute those orders to their appropriate sources.
- Scenario #3 - Attributing Leads from a Live Event
Case: You go to an in-person marketing event and collect a list of leads. Afterward, you import these leads into your CRM. After importing these leads to your CRM, you notice that some of these leads were already in your CRM. In this case, Wicked could not attribute any of these leads since the event was offline. So, by adding a Custom "Live_Event" Click, you could attribute your list of leads to the marketing event. The Conversion Type "Live_Event" will then automatically set your click with the correct "New Lead" or "Re-Opt-In" attribution.
- Scenario #4 - Automatically Attribute Clicks
Case: You have several clicks that you know should be attributed, but you're not sure how they should be attributed. In this case, you could set the Conversion Type to ATTRIBUTED and Wicked will attribute this for you.
You can also learn more about custom clicks in this help doc. Now, let's take a look at how to format your Custom Clicks for HTTP Post.
How to Format Custom Clicks for HTTP Post
When preparing your Custom Clicks for HTTP Post, you'll want to make sure you've added all the required fields and formatted them correctly. If you have not prepared your HTTP Post properly, you will, most often, receive an error message and you'll need to correct the error before the HTTP Post can pass through. In this section, we'll cover:
- The URL Endpoint
- The Required Headers
- The Body's Required Key-Value Pairs
- The Body's Optional Key-Value Pairs
- An Example HTTP Post with JavaScript
The URL Endpoint
To send Custom Clicks to Wicked, use the URL:
https://api.wickedreports.com/clicks/<client name>
You will need to replace <client name> with your client name in your account. See this help doc to find your client name.
The Required Headers
The only required header is Content-Type. It should be as follows:
- Content-Type: application/x-www-form-urlencoded
The Body's Required Key-Value Pairs:
- Email: Email of the lead for the conversion.
- Date_Time: This is a Date/Time setting to create the conversions against. You can use “NOW” for the current date/time or any date/time using this format: mm/dd/yyyy hh:mm am/pm
- Timezone: Timezone of Date/Time provided. This would be the timezone your CRM is using, NOT the Timezone of the Contact.
- Examples: EST Timezone="UTC-5”, CST Timezone="UTC-6, MST Timezone=“UTC-7”
- Infusionsoft uses EST (UTC-5)
- If you are using a PresetOveride EXISTING_LEADS or ORDER_LAST_CLICK, you can use "UTC-0"
- Timezones change with Daylight Savings Time. For example, EST (Eastern Standard Time) is UTC-5 part of the year and UTC-4 part of the year. If you are setting up an automation that will run continuously, you will need to be aware of this and make sure your automation updates when Daylight Savings Time occurs.
- Source: The utm_source value that will be applied to the click.
Not required, but highly recommended. - Campaign: The utm_campaign value that will be applied to the click
Not required, but highly recommended. - ConversionType: The type of conversion being sent to Wicked.
The valid options are:- ATTRIBUTED_CLICK
This Conversion Type would be used if you want to track a click but you aren’t sure how it should be attributed and you want Wicked to decide the attribution for you.
- ATTRIBUTED_CLICK
-
- NEW_LEAD
This Conversion Type would be used if you have historical leads, know where they came from, and want to ensure they receive First Optin attribution.
NOTE: When using this Conversion Type, the Date_Time value will be ignored. And, instead, the contact creation time will automatically be used. - REOPTIN
This Conversion Type would be used if you want to track a ReOptin. - LAST_CLICK
This Conversion Type would be used if you want to track the last click that happened immediately prior to the contact's purchase.
NOTE: The Order ID must be entered in the column in order to use this Conversion Type - LIVE_EVENT
This Conversion Type would be used if you were collecting leads at an event and want to create an opt-in for each of the leads you acquired there.- Use a Date/Time that is the early morning of the first day of the event.
- If the click is EARLIER than the create date of the contact in Wicked Reports, we will use the UTMs provided to set the First Optin Attribution for the contact.
- If the click is LATER than the create date of the contact in Wicked Reports, we will use the UTMs provided to create a Re-Optin for the contact.
- NEW_LEAD
The Body's Optional Key-Value Pairs:
- IP_ADDRESS: The IP address of the user.
Recommended, if available. - TimeOffset: The number of minutes to subtract from CLICK TIME.
- Example: If you know there is a 20-minute delay between when the click is created and when you want it to appear delayed, use 20 as your TIME OFFSET.
- Term: The utm_term value that will be applied to the click.
Recommended, if available. - Medium: The utm_medium value that will be applied to the click.
Recommended, if available. - Content: The utm_content value that will be applied to the click.
Recommended, if available - WickedId: If you know the Wicked ID of the click, you can use it here. If you have a value for WickedID, you must have a value for WickedSource
- WickedSource: If you know the Wicked Source of the click, you can use it here. If you have a value for WickedSource, you must have a value for WickedId.
- OrderID: The Order ID you would like to use to tie the last click conversion.
Required if using the "LAST_CLICK" ConversionType. Optional in all other cases.
Now that you've added all the required fields and formatted them correctly, you can go ahead and send your custom click to Wicked!
Example HTTP Post with JS Snippet:
https://jsfiddle.net/wickedivan/uf5zv12a/
An Alternative Method:
In addition, in case your CRM doesn't provide an easy way to send your data to Wicked, you can now send the custom click data as part of the URL query string.
Here's an example URL showing how to send your data using the query string:
https://api.wickedreports.com/clicks/<client name>?Source=Hubspot&Email=test@wickedreports.com&Content=Application&Date_Time=NOW&Timezone=UTC-5
How to Review Custom Clicks in Wicked
To ensure your custom clicks have passed into Wicked properly, you'll want to check out the API Verification Page.
The API Verification Page will allow you to see all the custom clicks that have passed into your Wicked Reports account. It pulls in fresh data every 30 minutes. So, you can send your custom clicks through, then come to this page to verify it's been received.
Simply change your filters, and look for your custom click.- If you see the custom click on your API verification page, then we've received it.
- If you do not see your custom click on the API verification page, that means an error has occurred and we have not received it. Please update the error before re-submitting.
That's it! You've now completed your custom click upload. If you'd like to learn more about custom clicks, such as how to see if your custom click has been processed, and where to view your custom click in Wicked Reports, then visit the Custom Clicks article for all that and more!
If you have any questions regarding custom click, then please review the FAQs below. If you find you still have questions after reading the FAQs, then reach out to the Wicked Reports support team via live chat, or by sending an email directly to support@wickedreports.com. We're always happy to help!
FAQs:
- I'm getting a "Content-Type" error. What should by Content Type be?
Content-Type should be “application/x-www-form-urlencoded”.