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.

Error getting Clicks

Highlighted
Occasional Contributor

Error getting Clicks

I am using the API v2 c#. I am getting an error when using this function:

 

lst = _constantContact.GetCampaignTrackingClicks(campaignID, 500, createdSince);

Other campaign tracking functions that are similar seem to work properly except for this one. It seems to be rejecting the campaign id.

 

There was an error deserializing the object of type CTCT.Components.ResultSet`1[[CTCT.Components.Tracking.ClickActivity, CTCT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]. The value '1114610711938' cannot be parsed as the type 'Int32'.

 

4 REPLIES 4
Highlighted
Regular Advisor

Re: Error getting Clicks

Hello,

 

Thanks for posting.  The campaignID is stored as a string, so trying to cast such a large number into that type is probably causing the problem.  Best keep the campaignID as a string.  I hope this answers your question.

 

Andrew B.

Constant Contact

API Support

Highlighted
Occasional Contributor

Re: Error getting Clicks

Actually, I didn't cast anything. It seems that the dll is doing that. I sent c.ID where c is a CTCT.Components.EmailCampaigns.EmailCampaign. It works in these functions:

 

GetCampaignTrackingSends

GetCampaignTrackingForwards

GetCampaignTrackingOpens

GetCampaignTrackingBounces

GetCampaignTrackingOptOuts

 

They all work fine. Sending the same c.ID errors only on:

 

GetCampaignTrackingClicks

Highlighted
Moderator

Re: Error getting Clicks

I saw your email that you sent in yesterday and our API support team is working on a bug fix for this in the wrapper library.  You're completely correct, not anything you're doing and it is a bug in the wrapper (we have a type missmatch in one of our classes).  Will get this fixed soon and check the fix into Github.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Contributor

Re: Error getting Clicks

You guys are awesome. Thanks!

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