Create Campaign
Use the following to create an Analytic Campaign.
URLs:
                http://sandbox.emailonacid.com/analyticsV1/CreateCampaign 
                https://api.emailonacid.com/analyticsV1/CreateCampaign
            
        Request:
<?xml version="1.0"?>
    <create_campaign>
    <name>Sample Campaign Name</name>
    <total_subscribers>2000</total_subscribers>
    <timezone>UM7</timezone>
    <read_threshold>15</read_threshold>
    <skim_threshold>7</skim_threshold>
    <delete_threshold>2</delete_threshold>
    <merge_tag>[SAMPLE_MERGE_TAG]</merge_tag>
    <click_tracking>
        <google_analytics>true</google_analytics>
        <url><![CDATA[]]></url>
        <html><![CDATA[]]></html>
    </click_tracking>
    </create_campaign>
    Request Details:
| Element | Description | Data Type | Required | Default | 
|---|---|---|---|---|
| name | The name of the campaign. | Alpha-numeric String | Y | |
| total_subscribers | The number of recipients planned for this campaign. This will determine many of your statistics such as % opens and % clicks. | Integer | Y | |
| timezone | Timezone that time based statistics calculated for. | Alpha-numeric String | Y | |
| read_threshold | Maximum number of seconds the user has the email open for to have it classified as a 'read'. This is for purposes of evaluating customer engagement.s | Integer | N | 15 | 
| skim_threshold | Maximum number of seconds the user has the email open for to have it classified as a 'skim'. This is for purposes of evaluating customer engagement. | Integer | N | 7 | 
| delete_threshold | Maximum number of seconds the user has the email open for to have it classified as a 'delete'. This is for purposes of evaluating customer engagement. | Integer | N | 2 | 
| merge_tag | Merge tags allow us to track subscriber activity and provide segmentation analytics. Most email service providers have some way for you to insert custom content into your email template via a 'merge tag'. For example Dear [first_name], but in our case, we need the unique email address, for example [email_address]. This address is inserted into the tracking code that we generate for you. | Alpha-numeric String | N | |
| click_tracking | Use this setting to enable click tracking | N | False | |
| google_analytics | If the links provided have google analytics on their pages. This setting will update our link tracking to work seamlessly with google analytic reporting. | Boolean | N | False | 
| html | Email HTML source. | Alpa-numeric String | Y, if click_tracking element exists Choice you can either use the this or the url tag listed below | |
| url | Url of email source. | Alpa-numeric String | Y, if click_tracking element exists Choice you can either use the this or the html tag listed above | 
Response:
<?xml version="1.0"?>
    <xml>
    <pixel_guid>CAMPAIGN GUID</pixel_guid>
    <tracking_code><![CDATA[.....]]></tracking_code>
    </xml>
    Response Details:
| Element | Description | 
|---|---|
| pixel_guid | The unique identifier for this campaign. Use this identifier with the other Analytics API functions to get and update information for this campaign. | 
| tracking_code | Tracking code to be inserted into the email html source before sending. If click tracking was enabled the tracking code will be the entire html source for the email. | 
Update Campaign
        Updates information for a campaign that has already been created. 
        If a campaign has already been activated only the campaign name and total_subscribers will be updated.
        
URLs:
                http://sandbox.emailonacid.com/analyticsV1/UpdateCampaign 
                https://api.emailonacid.com/analyticsV1/UpdateCampaign
            
        Request:
<?xml version="1.0"?>
    <update_campaign>
    <guid>CAMPAIGN GUID</guid>
    <name>Sample Campaign Name</name>
    <total_subscribers>2000</total_subscribers>
    <timezone>UM7</timezone>
    <read_threshold>15</read_threshold>
    <skim_threshold>7</skim_threshold>
    <delete_threshold>2</delete_threshold>
    <merge_tag>[SAMPLE_MERGE_TAG]</merge_tag>
    <click_tracking>
        <google_analytics>true</google_analytics>
        <url><![CDATA[]]></url>
        <html><![CDATA[]]></html>
    </click_tracking>
    </update_campaign>
    Request Details:
| Element | Description | Data Type | Required | Default | 
|---|---|---|---|---|
| guid | The unique identifier for the campaign you are attempting to update. | Alpha-numeric String | Y | |
| name | The name of the campaign. | Alpha-numeric String | Y | |
| total_subscribers | The number of recipients planned for this campaign. This will determine many of your statistics such as % opens and % clicks. | Integer | Y | |
| timezone | Timezone that time based statistics calculated for. | Alpha-numeric String | Y | |
| read_threshold | Maximum number of seconds the user has the email open for to have it classified as a 'read'. This is for purposes of evaluating customer engagement.s | Integer | N | 15 | 
| skim_threshold | Maximum number of seconds the user has the email open for to have it classified as a 'skim'. This is for purposes of evaluating customer engagement. | Integer | N | 7 | 
| delete_threshold | Maximum number of seconds the user has the email open for to have it classified as a 'delete'. This is for purposes of evaluating customer engagement. | Integer | N | 2 | 
| merge_tag | Merge tags allow us to track subscriber activity and provide segmentation analytics. Most email service providers have some way for you to insert custom content into your email template via a 'merge tag'. For example Dear [first_name], but in our case, we need the unique email address, for example [email_address]. This address is inserted into the tracking code that we generate for you. | Alpha-numeric String | N | |
| click_tracking | Use this setting to enable click tracking | N | False | |
| google_analytics | If the links provided have google analytics on their pages. This setting will update our link tracking to work seamlessly with google analytic reporting. | Boolean | N | False | 
| html | Email HTML source. | Alpa-numeric String | Y, if click_tracking element exists Choice you can either use the this or the url tag listed below | |
| url | Url of email source. | Alpa-numeric String | Y, if click_tracking element exists Choice you can either use the this or the html tag listed above | 
Response:
<?xml version="1.0"?>
    <xml>
    <pixel_guid>CAMPAIGN GUID</pixel_guid>
    <tracking_code><![CDATA[.....]]></tracking_code>
    </xml>
    Response Details:
| Element | Description | 
|---|---|
| pixel_guid | The unique identifier for this campaign. Use this identifier with the other Analytics API functions to get and update information for this campaign. | 
| tracking_code | Tracking code to be inserted into the email html source before sending. If click tracking was enabled the tracking code will be the entire html source for the email. | 
Activate Campaign
When a campaign is created it is created in test mode. This function will activate the campaign and clear out any test data the campaign has.
URLs:
                http://sandbox.emailonacid.com/analyticsV1/ActivateCampaign 
                https://api.emailonacid.com/analyticsV1/ActivateCampaign
            
        Request:
<?xml version="1.0"?>
    <activate_campaign>
    <guid>CAMPAIGN GUID</guid>
    </activate_campaign>
    Request Details:
| Element | Description | Data Type | Required | Default | 
|---|---|---|---|---|
| guid | The unique identifier for the campaign you are attempting to update. | Alpha-numeric String | Y | 
Activate Campaign Without Clearing Data
        Just like the API function above this will activate a campaign but will retain any test data the campaign has accumulated. 
        Use this only if the campaign email has been sent out but was never activated.
        
URLs:
                http://sandbox.emailonacid.com/analyticsV1/ActivateCampaignWithoutClearingData 
                https://api.emailonacid.com/analyticsV1/ActivateCampaignWithoutClearingData
            
        Request:
<?xml version="1.0"?>
    <activate_campaign_without_clearing_data>
    <guid>CAMPAIGN GUID</guid>
    </activate_campaign_without_clearing_data>
    Request Details:
| Element | Description | Data Type | Required | Default | 
|---|---|---|---|---|
| guid | The unique identifier for the campaign you are attempting to update. | Alpha-numeric String | Y | 
Clear Data
Clears out all data from a campaign.
URLs:
                http://sandbox.emailonacid.com/analyticsV1/ClearData 
                https://api.emailonacid.com/analyticsV1/ClearData
            
        Request:
<?xml version="1.0"?>
    <clear_data>
    <guid>CAMPAIGN GUID</guid>
    </clear_data>
    Request Details:
| Element | Description | Data Type | Required | Default | 
|---|---|---|---|---|
| guid | The unique identifier for the campaign you are attempting to clear data from. | Alpha-numeric String | Y | 
Set Campaign Expiration
Sets the expiration date of the campaign.
URLs:
                http://sandbox.emailonacid.com/analyticsV1/SetCampaignExpiration 
                https://api.emailonacid.com/analyticsV1/SetCampaignExpiration
            
        Request:
<?xml version="1.0"?>
    <set_campaign_expiration>
    <guid>CAMPAIGN GUID</guid>
    <date>YYYY-MM-DD</date>
    </set_campaign_expiration>
    Request Details:
| Element | Description | Data Type | Required | Default | 
|---|---|---|---|---|
| guid | The unique identifier for the campaign you are attempting to update. | Alpha-numeric String | Y | |
| date | Date to set the campaign to expire. Date format must be in YYYY-MM-DD Campaign cannot be set to expire with in 30 days of the start date. Campaign connot be set to expire more than 3 years after the start date. | Date Formatted String | Y |