Earnware Connect Guide

Installation and first time set-up

  • For more information visit: https://www.earnware.com/earnware-connect/
  • To install the Earnware Connect Plugin inside WordPress, go to Plugins and click Add New. In the search box, search for “Earnware Connect”, click Install and then Activate.
    Or you can download it and upload it to your WordPress website from here:  https://wordpress.org/plugins/earnware-connect/
  • After you installed and activated the plugin, go to Settings and click Earnware Connect. There, link the plugin to your Earnware Dashboard account.
  • Log into WordPress > Settings > Earnware Connect > Add Earnware User ID
  • Get EW Dashboard User ID From support@earnware.com
  • Check all the Tracking boxes

Creating basic forms inside WordPress

On your WordPress website, as long as Earnware Connect is installed and configured, publishing simple shortcodes will expose unstyled forms as you configure.

Simple Email Form Submit Example

Customizing Your Form Options

You may want to customize the default form, add more fields or change the Submit buttons name – for this there is a special syntax you can use.

In this form above, submit_text=”Submit Button Text” are the words that will go inside your Submit button.

success=”RELATIVE_URL” is the link your visitors will go to, after they click the Submit Button.

error=”RELATIVE_URL” is the link your visitors will go to in case they don’t use a proper email for example (like an error page to explain them to use proper a proper email address)

Field Types Available

tx_ prefix for text field
ta_ text area
cb_ checkbox
rb_ radiobox
sb_ select box

*txt_ prefix for text block (not a field, but this can spit out a message)
*sb_dish=”Please Select Your Preference|Beef,Chicken,Fish,Vegetarian”
*The first option – a placeholder..

Native Fields Supported

firstName
lastName
addressLine1
addressLine2
city
state
postalCode,zip
country
phone
cell
fax
gender
lists (dashboard list ids)
tags
dateRegistered
dateOpened
dateClicked
utm_campaign,campaign
utm_content,content
utm_term,term
utm_source,source,sourceId
utm_placement,placement,placementId
utm_medium,medium
ipAddress

Other short code form attributes

Display Alternative Shortcode/Forms to Known Subscribers

Using: role=EW.Roles.Subscriber success=”RELATIVE_URL” error=”RELATIVE_URL”

Other Field Form Capture Options Using Shortcode

Customizing the Placeholder Message in a Select Box

Using: sb_dish=”Please Select Your Preference|Beef,Chicken,Fish,Vegetarian”

How to create required form elements?

To create Required form elements, just state them in the shortcode like below. Note that the text field “tx_lastname” and the text area “ta_description” are both required.

Error Handling

Create a page on your site named: …/error/

Adding New Fields

Anything not matching the above field names will be set as a custom field

automatically in Earnware. The field names used will need to exist in the user’s

ESP also in order to post to the ESP.

Set Custom Fields in Your Email Service

At a bare minimum, create or confirm the following contact fields exist in your email system account so they are populated with opt-in source data as it comes in.

Fields: sourceId, placementId, medium, campaign, content, ipAddress,

Any Custom Forms or Other Form Tools

Any form tool or html form can point to: https://api.earnware.com/production/contacts

Minimum Form Posting Requirements

  • userId
  • emailAddress

Posting from other 3rd party forms

Non-Earnware 3rd Party Form Code Example

These examples are for posting data to Earnware through a web form built with a web form builder tool.

https://dashboard.earnware.com/examples/sub-form.html

https://dashboard.earnware.com/examples/sub-form-js.html

Multi-page form and funnel building

Collecting Additional Data from Known Subscribers

From an email broadcast, a user can click through to a page on a WordPress site and can enter additional form data which can post to Earnware w/o the need for the user to enter their email address again. Simply pass the user’s email address or user ID in the URL like the example below and your active Earnware form will use the user’s stored email passing it in a hidden field updating the contact record on submit.

Passing form variable data from page to page

Earnware forms store and pass variable data automatically, however, additional options exist to customize the behavior if the localStorage of the browser cannot be accessed successfully. Following is the shortcode to use to allow them to view the content even if the localStorage of the browser cannot be accessed successfully.

Single Visit Shortcode

Use the ew_singlevisit url=”/” short code to make a page a one-time visit. You can specify an alternative url if the user has already visited the page. If the browser’s localStorage is not available it will allow the user to visit the page multiple times and the single visit will not be enforced.

Gated Content Shortcode

Use the ew_hasrole short code to gate content. By default it checks for the subscribers but can be override to check for other roles (ones you create :)) You can add either a url or callback attribute to determine how you handle users without access.

You can also specify another parameter, “softenforcement” to indicate you want the gate enforced “softly” / gracefully. If true is passed in it will allow the user to view the content if localStorage is not available. i.e. ew_hasrole softenforcement=”true”

How to Merge Dynamic Content

You can merge any piece of content with a querystring value using the following markup:

“Default Value”

In this instance the myparamname value in the querystring will replace the “Default Value.” If no value exists the default value will remain.

Transform Url Shortcode

A popular use case with digital marketers is to track affiliate referral traffic with confidence; however, post a default affiliate ID, product ID, or alternative value if non-exists in the URL.

Use the ew_transform_url to take a base url and set values from the querystring or local storage with different key names. It is able to transform a url like:

http:/www.yahoo.com?aid=abba&pid=dabba&TID=do to http://www.google.com?SUBID1=abba&SUBID2=dabba&SUBID3=do

The following attributes can be set:

selector
Value of selector of links you wish to transform, e.g. .ck_link, #yourafflink. Default is .ck_link

sources
An array keys you want to pull values for and whether or not they are required. e.g. {key: ‘aid’, required: true},{key: ‘pid’}. If the source requirements are not met the default url will be used. The default url is what is already in the href attribute of the link tag. The default is: {key: ‘aid’, required: true}, {key: ‘sid’}, {key: ‘tid’, required: true}

targets
An array keys you want to the respective sources to have. e.g. ‘SUBID1’, ‘SUBID2’. In this example aid’s value would map to SUBID1 in the transformed url. The default is: ‘s1’, ‘s2’, ‘s3’

baseUrl
This is the url that the target parameters will be added to. Based on default parameters the following link:

<a class=”ck_link” href=”http://www.google.com?q=default value”>TRANSFORMED LINK</a>

would be transformed to navigate to: http://www.yahoo.com?s1=a&s2=b&s3=c

when referred to from: http://www.happyaffiliate.com/landingpage/?aid=a&pid=b&tid=c

when using the following shortcode: ew_transform_url baseUrl=”http://yahoo.com”