The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Cannot get campaign Numbers other than Sends

Highlighted
Occasional Participant

Cannot get campaign Numbers other than Sends

  I created a campaign and sent and received the email. The email was opened/clicked/forwarded, however, when I use wiztool to GET http://api.constantcontact.com/ws/customers/{UserName}/campaigns/{CampaignID}/events/sends


I can see the contact, campaign and time for the sends


However, for 


 


http://api.constantcontact.com/ws/customers/{UserName}/campaigns/{CampaignID}/events/opens


http://api.constantcontact.com/ws/customers/{UserName}/campaigns/{CampaignID}/events/clicks


http://api.constantcontact.com/ws/customers/{UserName}/campaigns/{CampaignID}/events/forwards


I cannot get the contact, campaign and time for opens/clicks/forwards. Neither the numbers for them.


 


Any similar problems were reported before? I am not sure whether this is because my account did not track these number indeed.........


 


Thanks,

7 REPLIES 7
Highlighted
Employee

Re: Cannot get campaignevent Numbers other than Sends

I apologize for the issue you're experiencing, but I am more than happy to assist you with this. Unfortunatlely I am going to need a little more information about what you're seeing in order to really troubleshoot this, as I am not seeing the same results. Both /sends and /opens are showing a specific <EventTime>


An entry for /campaigns/{campaign-id}/events/sends:


<entry>

    <id>http://api.constantcontact.com/ws/customers/{user-name}/events/sends/1103964176838,3792,1291423507623</id>

    <title type="text">Email Send Event for Customer: {user-name}, Campaign: http://api.constantcontact.com/ws/customers/{user-name}/campaigns/1103964176838</title>

    <updated>2010-12-04T00:45:07.623Z</updated>

    <author>

      <name>Constant Contact</name>

    </author>

    <content type="application/vnd.ctct+xml">

      <SentEvent xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/{user-name}/events/sends/1103964176838,3792,1291423507623">

        <Contact id="http://api.constantcontact.com/ws/customers/{user-name}/contacts/3792">

          <EmailAddress>test@gmail.com</EmailAddress>

          <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/{user-name}/contacts/3792" rel="self"></link>

        </Contact>

        <Campaign id="http://api.constantcontact.com/ws/customers/{user-name}/campaigns/1103964176838">

          <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/{user-name}/campaigns/1103964176838" rel="self"></link>

          <Name>Nov 23 2010</Name>

        </Campaign>

        <EventTime>2010-12-04T00:45:07.623Z</EventTime>

      </SentEvent>

    </content>

  </entry>

 


An entry for /campaigns/{campaign-id}/events/opens:


<entry>

    <id>http://api.constantcontact.com/ws/customers/{user-name}/events/opens/1103964176838,3791,1291436120000</id>

    <title type="text">Email Open Event for Customer: {user-name}, Campaign: http://api.constantcontact.com/ws/customers/{user-name}/campaigns/1103964176838</title>

    <updated>2010-12-04T04:15:20.000Z</updated>

    <author>

      <name>Constant Contact</name>

    </author>

    <content type="application/vnd.ctct+xml">

      <OpenEvent xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/{user-name}/events/opens/1103964176838,3791,1291436120000">

        <Contact id="http://api.constantcontact.com/ws/customers/{user-name}/contacts/3791">

          <EmailAddress>test@gmail.com</EmailAddress>

          <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/{user-name}/contacts/3791" rel="self"></link>

        </Contact>

        <Campaign id="http://api.constantcontact.com/ws/customers/{user-name}/campaigns/1103964176838">

          <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/{user-name}/campaigns/1103964176838" rel="self"></link>

          <Name>Nov 23 2010</Name>

        </Campaign>

        <EventTime>2010-12-04T04:15:20.000Z</EventTime>

      </OpenEvent>

    </content>

  </entry>

 


However, if a campaign had no opens, the /campaigns/{campaign-id}/opens response from the API would appear similar to:


<?xml version="1.0" encoding="UTF-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">

  <id>http://api.constantcontact.com/ws/customers/{user-name}/campaigns/1104162676825/events/opens</id>

  <title type="text">Opens Events for Customer: {user-name}, Campaign id: 1104162676825</title>

  <link href="opens"></link>

  <link href="opens" rel="self"></link>

  <author>

    <name>{user-name}</name>

  </author>

  <updated>2010-12-30T19:48:40.117Z</updated>

  <link href="/ws/customers/{user-name}/campaigns/1104162676825/events/opens" rel="first"></link>

</feed>

If you could reply with the XML you are seeing, I'd be happy to provide some further details on this. If you have any other questions please let us know.

David J

Highlighted
Occasional Participant

Re: Re: Cannot get campaignevent Numbers other than Sends

 Thanks for your reply. I did see the XML for sends as shown. The XML for opens is similar as your 'no opens' case. However, I did open the email. I used a gmail account and a hotmail account for the test. Neither for them can get the open numbers and forwards/clicks as well.


 


 

Highlighted
Occasional Participant

Re: Re: Cannot get campaignevent Numbers other than Sends

 There is a good news: now I can see 1 opens for the email I sent to the hotmail account. Because I have opened and forwarded the email in both of gmail and hotmail more than once, it obviously the update of the numbers is not frequently enough. 


 


I tried several times for the refreshing campaign like GET "https://api.constantcontact.com/ws/customers/ke.jia/campaigns/1104164819195?refresh=true"


It doesn't work. 


I am not sure whether I missed something, or problems with my account setting, or your server meet some network blocks.


 


Thanks,


 


 

Highlighted
Participant

How to get campaign Id.

Hi ke.jia


Can you please share the code that you have for obtaining the constant contact campaign results, i am also developing the similar type of application of retrieving the campaign results details.


Can you tell me how to get the campaign ids for the test campaigns that i have created.


For this i have created a username created the sample campaign and tested few for my accounts, i have also exeprience the same results of what you have said, in the constant contact gui interace reports,


today morning i am not able to access my account when i login i am getting the below error message, i have sent the mail to customer support, waiting for their reply.


"Your Constant Contact account has been temporarily deactivated. Please contact Customer Support so that we may resolve the problem and reactivate your account."


Thanks in advance.


sivakumar.

Highlighted
Occasional Participant

Re: Re: Re: Cannot get campaign Numbers other than Sends

 In fact, I have not worked on the code to obtain the campaign stats, because I want to first make sure the stats has the right number. 


If you want to get the campaign ids out, you just may have to parse the link of the campaign, e.g, find the sub string "campaign/" from the link and copy the remainder of the link in another string, which will be campaign id string. 


I have just looked into the campaign stats on CC website and wiztools. Still both of my tests show only 1 opens. That's better because I can get 'opens' for each. I have opened both of the test mailbox: one gmail, one hotmail for several times. Now on the CC website: I can see the number of the 'opens' is 1, but click the link, the detailed page shows three email addresses(with timestamp) are there. OK, I can believe I have opened the mail in hotmail box for three times. But why the number of the 'opens' is still 1?


Now I just want to get the numbers correct first. Does it matter with the image included in the email?


 


Thanks


 


 


 

Highlighted
Moderator

Hi Ke.jia, Campaign

Hi Ke.jia,


Campaign statistics are generally updated within 1-3 minutes of the event happening.  For open tracking, it is required that the receiving email client display images or a link to be clicked as image loading or clicks is the way to track interactions (and thus opens) through an email client.  Gmail and Hotmail both generally disable images when initially viewing an email so they do not count as opens until you select "display images" or "download all content".  If you used our "Forward Email" link in the Hotmail email, that would also explain the single open as that would count as a clicked link and thus an open action. 


If you're still having problems with this, you should email your username and other information to our webservices support team

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Participant

 This does make sense.

 This does make sense. Thanks, Dave.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured