Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

[Enhancement] Get unique clicks from specific journey using Python SDK #141

@AndreyDrabovich

Description

@AndreyDrabovich

I need to get unique clicks and opens from specific journey from Salesforce Marketing Cloud.

I use Python SDK and get all possible clicks from account. Here is my code:

myClient = FuelSDK.ET_Client(False, False,
    {'clientid': clientid, 
    'clientsecret':clientsecret,
    'useOAuth2Authentication': 'True',
    'authenticationurl': auth_base_url,
    'applicationType': 'server',
    'baseapiurl': rest_url,
    'soapendpoint': soap_url})

since = (date.today() - timedelta(10)).strftime('%Y-%m-%d')
event = FuelSDK.ET_ClickEvent()
event.auth_stub = myClient
event.props = [
    "ID", "ObjectID", "PartnerKey","CreatedDate","ModifiedDate",
    "Client.ID","SendID","SubscriberKey","EventDate","EventType",
    "TriggeredSendDefinitionObjectID","BatchID","URLID","URL"
    ]
search_filter = {'Property': 'EventDate', 'SimpleOperator': 'greaterThan', 'DateValue': str(since)}
event.search_filter = search_filter
response = event.get()

result_list = response.results

while response.more_results:
    response = event.getMoreResults()
    result_list.extend(response.results)

Do you have any ideas how I can filter this result? Or may be there are any other ways to get unique clicks with python?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions