Skip to content

Commit

Permalink
Merge pull request #278 from BingAds/update_examples
Browse files Browse the repository at this point in the history
update examples
  • Loading branch information
xinyuwen2 authored Apr 12, 2024
2 parents 4d613e0 + e7c8134 commit 91d506f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/v13/conversion_goals.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def main(authorization_data):
conversion_goals.ConversionGoal.append(duration_goal)

event_goal=set_elements_to_none(campaign_service.factory.create('EventGoal'))
event_goal.GoalCategory = "Purchase"
# The type of user interaction you want to track.
event_goal.ActionExpression = "play"
event_goal.ActionOperator = 'Contains'
Expand Down Expand Up @@ -118,6 +119,7 @@ def main(authorization_data):
conversion_goals.ConversionGoal.append(pages_viewed_per_visit_goal)

url_goal=set_elements_to_none(campaign_service.factory.create('UrlGoal'))
url_goal.GoalCategory = "Purchase"
url_goal.ConversionWindowInMinutes = 30
url_goal.CountType = 'All'
url_goal.Name = "My Url Goal"
Expand Down
1 change: 1 addition & 0 deletions examples/v13/offline_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def main(authorization_data):
conversion_goals=campaign_service.factory.create('ArrayOfConversionGoal')

offline_conversion_goal=set_elements_to_none(campaign_service.factory.create('OfflineConversionGoal'))
offline_conversion_goal.GoalCategory = "Purchase"
# Determines how long after a click that you want to count offline conversions.
offline_conversion_goal.ConversionWindowInMinutes = 43200
# If the count type is 'Unique' then only the first offline conversion will be counted.
Expand Down

0 comments on commit 91d506f

Please sign in to comment.