lkd_get_ads_analytics {rlinkedinads} | R Documentation |
Get Linkedin ads analytics The Analytics Finder should be used when specifying a single pivot.
Description
Get Linkedin ads analytics The Analytics Finder should be used when specifying a single pivot.
Usage
lkd_get_ads_analytics(
pivot = c("COMPANY", "ACCOUNT", "SHARE", "CAMPAIGN", "CREATIVE", "CAMPAIGN_GROUP",
"CONVERSION", "CONVERSATION_NODE", "CONVERSATION_NODE_OPTION_INDEX",
"SERVING_LOCATION", "CARD_INDEX", "MEMBER_COMPANY_SIZE", "MEMBER_INDUSTRY",
"MEMBER_SENIORITY", "MEMBER_JOB_TITLE", "MEMBER_JOB_FUNCTION", "MEMBER_COUNTRY_V2",
"MEMBER_REGION_V2", "MEMBER_COMPANY"),
fields = c("pivotValues", "dateRange", "clicks", "impressions", "dateRange",
"costInUsd", "oneClickLeads", "externalWebsiteConversions"),
date_from = Sys.Date() - 31,
date_to = Sys.Date() - 1,
time_granularity = c("DAILY", "ALL", "MONTHLY", "YEARLY"),
campaign_type = NULL,
sort_by_fields = c("", "COST_IN_LOCAL_CURRENCY", "IMPRESSIONS", "ONE_CLICK_LEADS",
"OPENS", "SENDS", "EXTERNAL_WEBSITE_CONVERSIONS"),
sort_by_order = c("", "ASCENDING", "DESCENDING"),
...
)
Arguments
pivot |
String. Pivot of results, by which each report data point is grouped.
|
fields |
String vector of report metrics. You can find list of actual metrics here. |
date_from |
Date. Represents the inclusive start time range of the analytics. If unset, it indicates an open range up to the end time. |
date_to |
Date. Represents the inclusive end time range of the analytics. Must be after start time if it's present. If unset, it indicates an open range from start time to everything after. |
time_granularity |
String. Time granularity of results. Valid enum values:
|
campaign_type |
String. Match result by a campaign type. Supported types are: TEXT_AD, SPONSORED_UPDATES, SPONSORED_INMAILS, DYNAMIC. Requires at least one other facet. Defaults to empty. |
sort_by_fields |
String. The field by which the results are sorted. Supported values include:
|
sort_by_order |
String. The order of the results. Supported values include:
|
... |
Faceting parameter For more details see next link.You must specify at least one of:
|
Value
tibble with report
Examples
## Not run:
stat <- lkd_get_ads_analytics(
pivot = 'CAMPAIGN',
date_from = '2023-09-01',
date_to = '2023-09-30',
time_granularity = 'DAILY',
fields = c(
'pivotValues',
'dateRange',
'clicks',
'impressions',
'dateRange',
'costInUsd',
'oneClickLeads',
'externalWebsiteConversions'
),
accounts = 'urn:li:sponsoredAccount:511009658',
campaigns = c(
'urn:li:sponsoredCampaign:253102116',
'urn:li:sponsoredCampaign:276103383'
)
)
## End(Not run)