Retrieve Click Event Details

The ET_ClickEvent object represents a column with a click event in a Marketing Cloud account. Use the SDK to interact with this object as described below:

Use the Get method to return information about existing click events.

Ruby

require 'fuelsdk'
myClient = FuelSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
clickevent = FuelSDK::ClickEvent.new
clickevent.authStub = myclient
response = clickevent.get
p response

PHP

require('ET_Client.php');
$myclient = new ET_Client();
$clickevent = new ET_ClickEvent();
$clickevent->authStub = $myclient;
$response = $clickevent->get();
print_r($response);

Python

import ET_Client
myclient = ET_Client.ET_Client()
clickevent = ET_Client.ET_ClickEvent()
clickevent.auth_stub = myclient
results = clickevent.get()
print results

CSharp

Using FuelSDK;
ET_Client myclient = new ET_Client();
ET_ClickEvent clickevent = new ET_ClickEvent();
clickevent.AuthStub = myclient;
GetReturn results = clickevent.Get();
Console.WriteLine("Get Status: " + results.Status.ToString());

Java

Streamline Your Usage of Get

Optionally, you can set the props property when using the Get method in order to limit the number of fields returned. If you don't define the props property, the call returns all fields. You can provide the props property as an array containing any combination of the following values:

  • ID
  • ObjectID
  • PartnerKey
  • CreatedDate
  • ModifiedDate
  • Client.ID
  • SendID
  • SubscriberKey
  • EventDate
  • EventType
  • TriggeredSendDefinitionObjectID
  • BatchID
  • URLID
  • URL

Ruby

clickevent.props = ['SendID', 'EventDate']

PHP

$clickevent->props = array('SendID', 'EventDate');

Python

clickevent.props = ["SendID", "EventDate"]

CSharp

clickevent.Props = new string[] { "SendID", "EventDate" };

Java

Filter Get Requests

Optionally, you can set the filter property to limit the number of results returned. If you don't define the props property, the call returns all fields. A filter consists of three key/value pairs:

  1. Property: Any of the properties that can be returned for a click event
  2. SimpleOperator: Valid simple operators include the following:
    • equals
    • notEquals
    • greaterThan
    • lessThan
  3. Value/DateValue: Use DateValue to match values when using a Date datatype. Otherwise, use Value.

Ruby

clickevent.filter = {'Property' => 'SubscriberKey','SimpleOperator' => 'equals','Value' => 'example@example.com'}

PHP

$clickevent->filter = array('Property' => 'SubscriberKey','SimpleOperator' => 'equals','Value' => 'example@example.com');

Python

clickevent.filter = {"Property" : "SubscriberKey", "SimpleOperator" : "equals", "Value" : "example@example.com"}

CSharp

clickevent.SearchFilter = new SimpleFilterPart() { Property = "SubscriberKey", SimpleOperator = SimpleOperators.greaterThan, Value = new string[] { "example@example.com" } };

Java