Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

Get timestamp and member's email of Mailchimp campaign clicks

According to Mailchimp documentation, it is possible to get the timestamp plus the email address of members who opened a campaign email.

https://mailchimp.com/developer/marketing/api/open-reports/list-campaign-open-details/

members: An array of objects, each representing a list member who opened a campaign email. Each members object will contain information about the number of total opens by a single member, as well as timestamps for each open event.

{
  "campaign_id": "string",
  "list_id": "string",
  "list_is_active": true,
  "contact_status": "string",
  "email_id": "string",
  "email_address": "string",
  "merge_fields": {
    "property1": null,
    "property2": null
  },
  "vip": true,
  "opens_count": 0,
  "opens": [
    {
      "timestamp": "2019-08-24T14:15:22Z"
    }
  ],
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}

However, it doesn't seem that the equivalent call clicks exists. The API endpoint that retrieves click information is inconsistent and doesn't have this information. (See below).

And so... How can I get timestamp plus the email address of members who clicked?

https://mailchimp.com/developer/marketing/api/link-clickers/list-clicked-link-subscribers/

members: An array of objects, each representing a member who clicked a specific link within a campaign.

{
  "email_id": "string",
  "email_address": "string",
  "merge_fields": {
    "property1": null,
    "property2": null
  },
  "vip": true,
  "clicks": 0,
  "campaign_id": "string",
  "url_id": "string",
  "list_id": "string",
  "list_is_active": true,
  "contact_status": "string",
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}
question from:https://stackoverflow.com/questions/66067485/get-timestamp-and-members-email-of-mailchimp-campaign-clicks

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The second API call doesnt have a timestamp field so you will not be able to get that data

{
  "members": [
    {
      "email_id": "string",
      "email_address": "string",
      "merge_fields": {
        "property1": null,
        "property2": null
      },
      "vip": true,
      "clicks": 0,
      "campaign_id": "string",
      "url_id": "string",
      "list_id": "string",
      "list_is_active": true,
      "contact_status": "string",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    }
  ],
  "campaign_id": "string",
  "total_items": 0,
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}

So unfortunately you are only able to get the timestamp of when someone opens the email, but not the timestamp of when the link in the email is clicked


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...