Class: HighLevel::Resources::AdManager
- Defined in:
- lib/high_level/resources/ad_manager.rb
Instance Method Summary collapse
-
#fb_add_custom_audience_member(audience_id:, body:, **_opts) ⇒ Object
Add custom audience member.
-
#fb_batch_update_audience_members(audience_id:, body:, **_opts) ⇒ Object
Batch update audience members.
-
#fb_create_conversation_form(body:, **_opts) ⇒ Object
Create conversation form.
-
#fb_create_integration(body:, **_opts) ⇒ Object
Create Facebook integration.
-
#fb_create_page_lead_form(page_id:, body:, **_opts) ⇒ Object
Create page lead form.
-
#fb_delete_ad(ad_id:, body:, **_opts) ⇒ Object
Delete ad.
-
#fb_delete_ad_account(ad_account_id:, body:, **_opts) ⇒ Object
Delete ad account.
-
#fb_delete_adset(adset_id:, body:, **_opts) ⇒ Object
Delete ad set.
-
#fb_delete_campaign(campaign_id:, body:, **_opts) ⇒ Object
Delete campaign.
-
#fb_delete_custom_audience(audience_id:, location_id: nil, **_opts) ⇒ Object
Delete custom audience.
-
#fb_delete_integration(body:, **_opts) ⇒ Object
Delete Facebook integration.
-
#fb_delete_page(location_id: nil, page_id: nil, **_opts) ⇒ Object
Delete page connection.
-
#fb_duplicate_ad(ad_id:, **_opts) ⇒ Object
Duplicate ad.
-
#fb_duplicate_adset(adset_id:, **_opts) ⇒ Object
Duplicate ad set.
-
#fb_duplicate_campaign(campaign_id:, body:, **_opts) ⇒ Object
Duplicate campaign.
-
#fb_get_ad_account(ad_account_id:, location_id: nil, **_opts) ⇒ Object
Get ad account details.
-
#fb_get_ad_accounts(location_id: nil, type: nil, next_: nil, fetch_all: nil, limit: nil, **_opts) ⇒ Object
Get ad accounts.
-
#fb_get_campaign(campaign_id:, location_id: nil, fields: nil, source: nil, **_opts) ⇒ Object
Get campaign with linked entities.
-
#fb_get_campaign_reporting(campaign_id:, location_id: nil, start_date: nil, end_date: nil, **_opts) ⇒ Object
Get campaign reporting.
-
#fb_get_conversation_forms(location_id: nil, **_opts) ⇒ Object
Get conversation forms.
-
#fb_get_current_user(location_id: nil, **_opts) ⇒ Object
Get current Facebook user.
-
#fb_get_custom_audience_by_id(audience_id:, location_id: nil, **_opts) ⇒ Object
Get custom audience by ID.
-
#fb_get_custom_audiences(location_id: nil, type: nil, source: nil, ad_account_id: nil, **_opts) ⇒ Object
Get custom audiences.
-
#fb_get_entity(location_id: nil, type: nil, next_: nil, fetch_all: nil, campaign_id: nil, ad_set_id: nil, entity_type: nil, search_id: nil, selected_ad_account_id: nil, **_opts) ⇒ Object
Get entities.
-
#fb_get_instagram_accounts(page_id:, location_id: nil, type: nil, **_opts) ⇒ Object
Get Instagram accounts for page.
-
#fb_get_integration(location_id: nil, **_opts) ⇒ Object
Get Facebook integration.
-
#fb_get_lead_form(lead_form_id:, location_id: nil, **_opts) ⇒ Object
Get lead form by ID.
-
#fb_get_page_lead_forms(page_id:, location_id: nil, **_opts) ⇒ Object
Get page lead forms.
-
#fb_get_pages(location_id: nil, fetch_existing: nil, **_opts) ⇒ Object
Get Facebook pages.
-
#fb_get_pixels(location_id: nil, channel: nil, page_id: nil, ig_user_id: nil, **_opts) ⇒ Object
Get conversion pixels.
-
#fb_get_reporting(location_id: nil, group_by: nil, start_date: nil, end_date: nil, type: nil, fields: nil, **_opts) ⇒ Object
Get reporting data.
-
#fb_get_reporting_list(location_id: nil, list_type: nil, start_date: nil, end_date: nil, campaign_id: nil, type: nil, **_opts) ⇒ Object
Get reporting list.
-
#fb_pause_ad(ad_id:, body:, **_opts) ⇒ Object
Pause ad.
-
#fb_pause_adset(adset_id:, body:, **_opts) ⇒ Object
Pause ad set.
-
#fb_pause_campaign(campaign_id:, body:, **_opts) ⇒ Object
Pause campaign.
-
#fb_publish_campaign(campaign_id:, body:, **_opts) ⇒ Object
Publish campaign.
-
#fb_remove_custom_audience_member(audience_id:, body:, **_opts) ⇒ Object
Remove custom audience member.
-
#fb_resume_ad(ad_id:, body:, **_opts) ⇒ Object
Resume ad.
-
#fb_resume_adset(adset_id:, body:, **_opts) ⇒ Object
Resume ad set.
-
#fb_resume_campaign(campaign_id:, body:, **_opts) ⇒ Object
Resume campaign.
-
#fb_search_targeting(type: nil, query: nil, search_type: nil, **_opts) ⇒ Object
Search targeting options.
-
#fb_set_default_page(body:, location_id: nil, **_opts) ⇒ Object
Set default page.
-
#fb_update_custom_audience(audience_id:, body:, **_opts) ⇒ Object
Update custom audience.
-
#fb_upsert_ad(body:, **_opts) ⇒ Object
Upsert ad.
-
#fb_upsert_adset(body:, **_opts) ⇒ Object
Upsert adset.
-
#fb_upsert_campaign(body:, **_opts) ⇒ Object
Upsert campaign.
-
#fb_upsert_pixel(body:, **_opts) ⇒ Object
Upsert conversion pixel.
-
#google_create_integration(body:, **_opts) ⇒ Object
Create Google integration.
-
#google_create_offline_user_list_job(body:, **_opts) ⇒ Object
Create offline user list job.
-
#google_delete_ad_account(ad_account_id:, body:, **_opts) ⇒ Object
Delete ad account.
-
#google_delete_conversion(conversion_id:, location_id: nil, **_opts) ⇒ Object
Delete conversion.
-
#google_delete_segment(segment_id:, location_id: nil, type: nil, **_opts) ⇒ Object
Delete segment.
-
#google_get_ad_account_details(ad_account_id:, location_id: nil, **_opts) ⇒ Object
Get ad account details.
-
#google_get_ad_accounts(location_id: nil, type: nil, **_opts) ⇒ Object
Get Google ad accounts.
-
#google_get_assets(location_id: nil, type: nil, id: nil, advertiser_only: nil, **_opts) ⇒ Object
Get assets.
-
#google_get_audience_by_id(audience_id:, location_id: nil, **_opts) ⇒ Object
Get audience by ID.
-
#google_get_audiences(location_id: nil, **_opts) ⇒ Object
Get audiences.
-
#google_get_campaign_by_id(ad_id:, location_id: nil, **_opts) ⇒ Object
Get Google campaign by ID.
-
#google_get_campaign_reporting(campaign_id:, location_id: nil, start_date: nil, end_date: nil, **_opts) ⇒ Object
Get campaign reporting.
-
#google_get_conversion_by_id(conversion_id:, location_id: nil, **_opts) ⇒ Object
Get conversion by ID.
-
#google_get_conversion_goals(location_id: nil, **_opts) ⇒ Object
Get conversion goals.
-
#google_get_conversions(location_id: nil, type: nil, conversion_type: nil, category: nil, start_date: nil, end_date: nil, **_opts) ⇒ Object
Get conversions.
-
#google_get_current_user(location_id: nil, **_opts) ⇒ Object
Get current Google user.
-
#google_get_entity(location_id: nil, type: nil, campaign_id: nil, ad_group_id: nil, entity_type: nil, search_id: nil, start_date: nil, end_date: nil, selected_ad_account_id: nil, **_opts) ⇒ Object
Get entities.
-
#google_get_integration(location_id: nil, **_opts) ⇒ Object
Get Google integration.
-
#google_get_keyword_ideas(body:, location_id: nil, **_opts) ⇒ Object
Get keyword ideas.
-
#google_get_reporting(location_id: nil, group_by: nil, start_date: nil, end_date: nil, type: nil, fields: nil, **_opts) ⇒ Object
Get reporting data.
-
#google_get_reporting_list(location_id: nil, list_type: nil, start_date: nil, end_date: nil, campaign_id: nil, type: nil, **_opts) ⇒ Object
Get reporting list.
-
#google_get_segment_by_id(segment_id:, location_id: nil, type: nil, **_opts) ⇒ Object
Get segment by ID.
-
#google_get_segments(location_id: nil, type: nil, **_opts) ⇒ Object
Get segments.
-
#google_get_target_interests(location_id: nil, type: nil, advertising_channel_type: nil, **_opts) ⇒ Object
Get target interests.
-
#google_publish_ad(ad_id:, **_opts) ⇒ Object
Publish ad.
-
#google_search_targeting(type: nil, query: nil, location_id: nil, **_opts) ⇒ Object
Search targeting options.
-
#google_upsert_assets(body:, **_opts) ⇒ Object
Upsert assets.
-
#google_upsert_audience(body:, **_opts) ⇒ Object
Upsert audience.
-
#google_upsert_campaign(body:, **_opts) ⇒ Object
Upsert Google campaign.
-
#google_upsert_conversion(body:, **_opts) ⇒ Object
Upsert conversion.
-
#google_upsert_segment(body:, location_id: nil, type: nil, **_opts) ⇒ Object
Upsert segment.
-
#li_create_integration(body:, **_opts) ⇒ Object
Create LinkedIn integration.
-
#li_create_lead_form(body:, location_id: nil, **_opts) ⇒ Object
Create lead form.
-
#li_delete_ad_account(location_id: nil, ad_account_id: nil, **_opts) ⇒ Object
Delete ad account.
-
#li_get_ad_account_details(location_id: nil, ad_account_id: nil, **_opts) ⇒ Object
Get ad account details.
-
#li_get_ad_accounts(location_id: nil, **_opts) ⇒ Object
Get LinkedIn ad accounts.
-
#li_get_ad_analytics(location_id: nil, pivot: nil, group_by: nil, start_date: nil, end_date: nil, entity_urns: nil, fields: nil, **_opts) ⇒ Object
Get ad analytics.
-
#li_get_campaign_group(ad_id:, location_id: nil, **_opts) ⇒ Object
Get ad campaign group.
-
#li_get_campaign_group_reporting(campaign_group_id:, location_id: nil, start_date: nil, end_date: nil, fields: nil, **_opts) ⇒ Object
Get campaign group reporting.
-
#li_get_current_user(location_id: nil, **_opts) ⇒ Object
Get current LinkedIn user.
-
#li_get_integration(location_id: nil, **_opts) ⇒ Object
Get LinkedIn integration.
-
#li_get_lead_forms(account_id:, location_id: nil, **_opts) ⇒ Object
Get lead forms.
-
#li_get_reporting_list(location_id: nil, list_type: nil, campaign_id: nil, campaign_group_id: nil, start_date: nil, end_date: nil, fields: nil, **_opts) ⇒ Object
Get reporting list.
-
#li_publish_campaign_group(ad_id:, body:, **_opts) ⇒ Object
Publish ad campaign group.
-
#li_search_targeting(location_id: nil, facet: nil, query: nil, q: nil, **_opts) ⇒ Object
Search targeting options.
-
#li_update_ad_status(ad_id:, body:, location_id: nil, **_opts) ⇒ Object
Update ad status.
-
#li_upsert_campaign_group(body:, **_opts) ⇒ Object
Upsert ad campaign group.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#fb_add_custom_audience_member(audience_id:, body:, **_opts) ⇒ Object
Add custom audience member
Add a member to a Facebook custom audience
312 313 314 315 316 317 318 319 |
# File 'lib/high_level/resources/ad_manager.rb', line 312 def fb_add_custom_audience_member(audience_id:, body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/custom-audience/#{audience_id}/member", security: ["bearer"], body: body ) end |
#fb_batch_update_audience_members(audience_id:, body:, **_opts) ⇒ Object
Batch update audience members
Add or remove members in bulk from a Facebook custom audience via CSV or smart lists
336 337 338 339 340 341 342 343 |
# File 'lib/high_level/resources/ad_manager.rb', line 336 def fb_batch_update_audience_members(audience_id:, body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/custom-audience/#{audience_id}/member/batch", security: ["bearer"], body: body ) end |
#fb_create_conversation_form(body:, **_opts) ⇒ Object
Create conversation form
Create a new Facebook conversation lead form
156 157 158 159 160 161 162 163 |
# File 'lib/high_level/resources/ad_manager.rb', line 156 def fb_create_conversation_form(body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/conversation-forms", security: ["bearer"], body: body ) end |
#fb_create_integration(body:, **_opts) ⇒ Object
Create Facebook integration
Create a Facebook ad integration for a location with page and ad account
180 181 182 183 184 185 186 187 |
# File 'lib/high_level/resources/ad_manager.rb', line 180 def fb_create_integration(body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/integration", security: ["bearer"], body: body ) end |
#fb_create_page_lead_form(page_id:, body:, **_opts) ⇒ Object
Create page lead form
Create a new lead gen form on a Facebook page
96 97 98 99 100 101 102 103 |
# File 'lib/high_level/resources/ad_manager.rb', line 96 def fb_create_page_lead_form(page_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/page/#{page_id}/forms", security: ["bearer"], body: body ) end |
#fb_delete_ad(ad_id:, body:, **_opts) ⇒ Object
Delete ad
Delete a Facebook ad by ID
563 564 565 566 567 568 569 570 |
# File 'lib/high_level/resources/ad_manager.rb', line 563 def fb_delete_ad(ad_id:, body:, **_opts) request( method: :delete, path: "/ad-publishing/facebook/ads/#{ad_id}", security: ["bearer"], body: body ) end |
#fb_delete_ad_account(ad_account_id:, body:, **_opts) ⇒ Object
Delete ad account
Remove a Facebook ad account connection from a location
132 133 134 135 136 137 138 139 |
# File 'lib/high_level/resources/ad_manager.rb', line 132 def fb_delete_ad_account(ad_account_id:, body:, **_opts) request( method: :delete, path: "/ad-publishing/facebook/ad-accounts/#{ad_account_id}", security: ["bearer"], body: body ) end |
#fb_delete_adset(adset_id:, body:, **_opts) ⇒ Object
Delete ad set
Delete a Facebook ad set by ID
516 517 518 519 520 521 522 523 |
# File 'lib/high_level/resources/ad_manager.rb', line 516 def fb_delete_adset(adset_id:, body:, **_opts) request( method: :delete, path: "/ad-publishing/facebook/adsets/#{adset_id}", security: ["bearer"], body: body ) end |
#fb_delete_campaign(campaign_id:, body:, **_opts) ⇒ Object
Delete campaign
Delete a Facebook campaign by ID
469 470 471 472 473 474 475 476 |
# File 'lib/high_level/resources/ad_manager.rb', line 469 def fb_delete_campaign(campaign_id:, body:, **_opts) request( method: :delete, path: "/ad-publishing/facebook/campaigns/#{campaign_id}", security: ["bearer"], body: body ) end |
#fb_delete_custom_audience(audience_id:, location_id: nil, **_opts) ⇒ Object
Delete custom audience
Delete a Facebook custom audience by ID
300 301 302 303 304 305 306 307 |
# File 'lib/high_level/resources/ad_manager.rb', line 300 def fb_delete_custom_audience(audience_id:, location_id: nil, **_opts) request( method: :delete, path: "/ad-publishing/facebook/custom-audience/#{audience_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_delete_integration(body:, **_opts) ⇒ Object
Delete Facebook integration
Remove the Facebook ad integration from a location
192 193 194 195 196 197 198 199 |
# File 'lib/high_level/resources/ad_manager.rb', line 192 def fb_delete_integration(body:, **_opts) request( method: :delete, path: "/ad-publishing/facebook/integration", security: ["bearer"], body: body ) end |
#fb_delete_page(location_id: nil, page_id: nil, **_opts) ⇒ Object
Delete page connection
Remove a Facebook page connection from a location
228 229 230 231 232 233 234 235 |
# File 'lib/high_level/resources/ad_manager.rb', line 228 def fb_delete_page(location_id: nil, page_id: nil, **_opts) request( method: :delete, path: "/ad-publishing/facebook/page", security: ["bearer"], params: { "locationId" => location_id, "pageId" => page_id }.compact ) end |
#fb_duplicate_ad(ad_id:, **_opts) ⇒ Object
Duplicate ad
Duplicate an existing Facebook ad
552 553 554 555 556 557 558 |
# File 'lib/high_level/resources/ad_manager.rb', line 552 def fb_duplicate_ad(ad_id:, **_opts) request( method: :post, path: "/ad-publishing/facebook/ads/#{ad_id}/duplicate", security: ["bearer"] ) end |
#fb_duplicate_adset(adset_id:, **_opts) ⇒ Object
Duplicate ad set
Duplicate an existing Facebook ad set
505 506 507 508 509 510 511 |
# File 'lib/high_level/resources/ad_manager.rb', line 505 def fb_duplicate_adset(adset_id:, **_opts) request( method: :post, path: "/ad-publishing/facebook/adsets/#{adset_id}/duplicate", security: ["bearer"] ) end |
#fb_duplicate_campaign(campaign_id:, body:, **_opts) ⇒ Object
Duplicate campaign
Duplicate an existing Facebook campaign
457 458 459 460 461 462 463 464 |
# File 'lib/high_level/resources/ad_manager.rb', line 457 def fb_duplicate_campaign(campaign_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/campaigns/#{campaign_id}/duplicate", security: ["bearer"], body: body ) end |
#fb_get_ad_account(ad_account_id:, location_id: nil, **_opts) ⇒ Object
Get ad account details
Retrieve details of a specific Facebook ad account
120 121 122 123 124 125 126 127 |
# File 'lib/high_level/resources/ad_manager.rb', line 120 def fb_get_ad_account(ad_account_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/ad-accounts/#{ad_account_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_ad_accounts(location_id: nil, type: nil, next_: nil, fetch_all: nil, limit: nil, **_opts) ⇒ Object
Get ad accounts
Retrieve Facebook ad accounts available for the connected user
108 109 110 111 112 113 114 115 |
# File 'lib/high_level/resources/ad_manager.rb', line 108 def fb_get_ad_accounts(location_id: nil, type: nil, next_: nil, fetch_all: nil, limit: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/ad-accounts", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "next" => next_, "fetchAll" => fetch_all, "limit" => limit }.compact ) end |
#fb_get_campaign(campaign_id:, location_id: nil, fields: nil, source: nil, **_opts) ⇒ Object
Get campaign with linked entities
Retrieve a Facebook campaign with its linked adsets and ads
373 374 375 376 377 378 379 380 |
# File 'lib/high_level/resources/ad_manager.rb', line 373 def fb_get_campaign(campaign_id:, location_id: nil, fields: nil, source: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/campaign/#{campaign_id}", security: ["bearer"], params: { "locationId" => location_id, "fields" => fields, "source" => source }.compact ) end |
#fb_get_campaign_reporting(campaign_id:, location_id: nil, start_date: nil, end_date: nil, **_opts) ⇒ Object
Get campaign reporting
Retrieve reporting metrics for a specific Facebook campaign
24 25 26 27 28 29 30 31 |
# File 'lib/high_level/resources/ad_manager.rb', line 24 def fb_get_campaign_reporting(campaign_id:, location_id: nil, start_date: nil, end_date: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/reporting/campaign/#{campaign_id}", security: ["bearer"], params: { "locationId" => location_id, "startDate" => start_date, "endDate" => end_date }.compact ) end |
#fb_get_conversation_forms(location_id: nil, **_opts) ⇒ Object
Get conversation forms
Retrieve Facebook conversation lead forms for a location
144 145 146 147 148 149 150 151 |
# File 'lib/high_level/resources/ad_manager.rb', line 144 def fb_get_conversation_forms(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/conversation-forms", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_current_user(location_id: nil, **_opts) ⇒ Object
Get current Facebook user
Retrieve the authenticated Facebook user profile for a location
48 49 50 51 52 53 54 55 |
# File 'lib/high_level/resources/ad_manager.rb', line 48 def fb_get_current_user(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/me", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_custom_audience_by_id(audience_id:, location_id: nil, **_opts) ⇒ Object
Get custom audience by ID
Retrieve a specific Facebook custom audience by its ID
276 277 278 279 280 281 282 283 |
# File 'lib/high_level/resources/ad_manager.rb', line 276 def fb_get_custom_audience_by_id(audience_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/custom-audience/#{audience_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_custom_audiences(location_id: nil, type: nil, source: nil, ad_account_id: nil, **_opts) ⇒ Object
Get custom audiences
Retrieve Facebook custom audiences for a location
264 265 266 267 268 269 270 271 |
# File 'lib/high_level/resources/ad_manager.rb', line 264 def fb_get_custom_audiences(location_id: nil, type: nil, source: nil, ad_account_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/custom-audience", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "source" => source, "adAccountId" => ad_account_id }.compact ) end |
#fb_get_entity(location_id: nil, type: nil, next_: nil, fetch_all: nil, campaign_id: nil, ad_set_id: nil, entity_type: nil, search_id: nil, selected_ad_account_id: nil, **_opts) ⇒ Object
Get entities
Retrieve Facebook campaigns, adsets, or ads based on entity type
385 386 387 388 389 390 391 392 |
# File 'lib/high_level/resources/ad_manager.rb', line 385 def fb_get_entity(location_id: nil, type: nil, next_: nil, fetch_all: nil, campaign_id: nil, ad_set_id: nil, entity_type: nil, search_id: nil, selected_ad_account_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/entity", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "next" => next_, "fetchAll" => fetch_all, "campaignId" => campaign_id, "adSetId" => ad_set_id, "entityType" => entity_type, "searchId" => search_id, "selectedAdAccountId" => selected_ad_account_id }.compact ) end |
#fb_get_instagram_accounts(page_id:, location_id: nil, type: nil, **_opts) ⇒ Object
Get Instagram accounts for page
Retrieve Instagram accounts linked to a specific Facebook page
72 73 74 75 76 77 78 79 |
# File 'lib/high_level/resources/ad_manager.rb', line 72 def fb_get_instagram_accounts(page_id:, location_id: nil, type: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/page/#{page_id}/instagram", security: ["bearer"], params: { "locationId" => location_id, "type" => type }.compact ) end |
#fb_get_integration(location_id: nil, **_opts) ⇒ Object
Get Facebook integration
Retrieve the Facebook ad integration details for a location
168 169 170 171 172 173 174 175 |
# File 'lib/high_level/resources/ad_manager.rb', line 168 def fb_get_integration(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/integration", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_lead_form(lead_form_id:, location_id: nil, **_opts) ⇒ Object
Get lead form by ID
Retrieve a specific Facebook lead form by its ID
361 362 363 364 365 366 367 368 |
# File 'lib/high_level/resources/ad_manager.rb', line 361 def fb_get_lead_form(lead_form_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/lead-form/#{lead_form_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_page_lead_forms(page_id:, location_id: nil, **_opts) ⇒ Object
Get page lead forms
Retrieve lead gen forms for a specific Facebook page
84 85 86 87 88 89 90 91 |
# File 'lib/high_level/resources/ad_manager.rb', line 84 def fb_get_page_lead_forms(page_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/page/#{page_id}/forms", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#fb_get_pages(location_id: nil, fetch_existing: nil, **_opts) ⇒ Object
Get Facebook pages
Retrieve Facebook pages associated with the connected account
60 61 62 63 64 65 66 67 |
# File 'lib/high_level/resources/ad_manager.rb', line 60 def fb_get_pages(location_id: nil, fetch_existing: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/pages", security: ["bearer"], params: { "locationId" => location_id, "fetchExisting" => fetch_existing }.compact ) end |
#fb_get_pixels(location_id: nil, channel: nil, page_id: nil, ig_user_id: nil, **_opts) ⇒ Object
Get conversion pixels
Retrieve Facebook conversion pixels for a location
240 241 242 243 244 245 246 247 |
# File 'lib/high_level/resources/ad_manager.rb', line 240 def fb_get_pixels(location_id: nil, channel: nil, page_id: nil, ig_user_id: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/pixels", security: ["bearer"], params: { "locationId" => location_id, "channel" => channel, "pageId" => page_id, "igUserId" => ig_user_id }.compact ) end |
#fb_get_reporting(location_id: nil, group_by: nil, start_date: nil, end_date: nil, type: nil, fields: nil, **_opts) ⇒ Object
Get reporting data
Retrieve aggregated Facebook ad reporting metrics for a location
12 13 14 15 16 17 18 19 |
# File 'lib/high_level/resources/ad_manager.rb', line 12 def fb_get_reporting(location_id: nil, group_by: nil, start_date: nil, end_date: nil, type: nil, fields: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/reporting", security: ["bearer"], params: { "locationId" => location_id, "groupBy" => group_by, "startDate" => start_date, "endDate" => end_date, "type" => type, "fields" => fields }.compact ) end |
#fb_get_reporting_list(location_id: nil, list_type: nil, start_date: nil, end_date: nil, campaign_id: nil, type: nil, **_opts) ⇒ Object
Get reporting list
Retrieve a list of Facebook campaigns, adsets, or ads with reporting data
36 37 38 39 40 41 42 43 |
# File 'lib/high_level/resources/ad_manager.rb', line 36 def fb_get_reporting_list(location_id: nil, list_type: nil, start_date: nil, end_date: nil, campaign_id: nil, type: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/reporting/list", security: ["bearer"], params: { "locationId" => location_id, "listType" => list_type, "startDate" => start_date, "endDate" => end_date, "campaignId" => campaign_id, "type" => type }.compact ) end |
#fb_pause_ad(ad_id:, body:, **_opts) ⇒ Object
Pause ad
Pause a running Facebook ad
528 529 530 531 532 533 534 535 |
# File 'lib/high_level/resources/ad_manager.rb', line 528 def fb_pause_ad(ad_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/ads/#{ad_id}/pause", security: ["bearer"], body: body ) end |
#fb_pause_adset(adset_id:, body:, **_opts) ⇒ Object
Pause ad set
Pause a running Facebook ad set
481 482 483 484 485 486 487 488 |
# File 'lib/high_level/resources/ad_manager.rb', line 481 def fb_pause_adset(adset_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/adsets/#{adset_id}/pause", security: ["bearer"], body: body ) end |
#fb_pause_campaign(campaign_id:, body:, **_opts) ⇒ Object
Pause campaign
Pause a running Facebook campaign
433 434 435 436 437 438 439 440 |
# File 'lib/high_level/resources/ad_manager.rb', line 433 def fb_pause_campaign(campaign_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/campaigns/#{campaign_id}/pause", security: ["bearer"], body: body ) end |
#fb_publish_campaign(campaign_id:, body:, **_opts) ⇒ Object
Publish campaign
Publish a Facebook campaign and push it live to Facebook
216 217 218 219 220 221 222 223 |
# File 'lib/high_level/resources/ad_manager.rb', line 216 def fb_publish_campaign(campaign_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/campaigns/#{campaign_id}/publish", security: ["bearer"], body: body ) end |
#fb_remove_custom_audience_member(audience_id:, body:, **_opts) ⇒ Object
Remove custom audience member
Remove a member from a Facebook custom audience
324 325 326 327 328 329 330 331 |
# File 'lib/high_level/resources/ad_manager.rb', line 324 def fb_remove_custom_audience_member(audience_id:, body:, **_opts) request( method: :delete, path: "/ad-publishing/facebook/custom-audience/#{audience_id}/member", security: ["bearer"], body: body ) end |
#fb_resume_ad(ad_id:, body:, **_opts) ⇒ Object
Resume ad
Resume a paused Facebook ad
540 541 542 543 544 545 546 547 |
# File 'lib/high_level/resources/ad_manager.rb', line 540 def fb_resume_ad(ad_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/ads/#{ad_id}/resume", security: ["bearer"], body: body ) end |
#fb_resume_adset(adset_id:, body:, **_opts) ⇒ Object
Resume ad set
Resume a paused Facebook ad set
493 494 495 496 497 498 499 500 |
# File 'lib/high_level/resources/ad_manager.rb', line 493 def fb_resume_adset(adset_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/adsets/#{adset_id}/resume", security: ["bearer"], body: body ) end |
#fb_resume_campaign(campaign_id:, body:, **_opts) ⇒ Object
Resume campaign
Resume a paused Facebook campaign
445 446 447 448 449 450 451 452 |
# File 'lib/high_level/resources/ad_manager.rb', line 445 def fb_resume_campaign(campaign_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/facebook/campaigns/#{campaign_id}/resume", security: ["bearer"], body: body ) end |
#fb_search_targeting(type: nil, query: nil, search_type: nil, **_opts) ⇒ Object
Search targeting options
Search Facebook geo-locations and interests for ad targeting
204 205 206 207 208 209 210 211 |
# File 'lib/high_level/resources/ad_manager.rb', line 204 def fb_search_targeting(type: nil, query: nil, search_type: nil, **_opts) request( method: :get, path: "/ad-publishing/facebook/targeting/search", security: ["bearer"], params: { "type" => type, "query" => query, "searchType" => search_type }.compact ) end |
#fb_set_default_page(body:, location_id: nil, **_opts) ⇒ Object
Set default page
Set the default Facebook page for a location
348 349 350 351 352 353 354 355 356 |
# File 'lib/high_level/resources/ad_manager.rb', line 348 def fb_set_default_page(body:, location_id: nil, **_opts) request( method: :put, path: "/ad-publishing/facebook/page/default", security: ["bearer"], params: { "locationId" => location_id }.compact, body: body ) end |
#fb_update_custom_audience(audience_id:, body:, **_opts) ⇒ Object
Update custom audience
Update name or description of a Facebook custom audience
288 289 290 291 292 293 294 295 |
# File 'lib/high_level/resources/ad_manager.rb', line 288 def fb_update_custom_audience(audience_id:, body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/custom-audience/#{audience_id}", security: ["bearer"], body: body ) end |
#fb_upsert_ad(body:, **_opts) ⇒ Object
Upsert ad
Create or update a Facebook ad (v2)
421 422 423 424 425 426 427 428 |
# File 'lib/high_level/resources/ad_manager.rb', line 421 def fb_upsert_ad(body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/ads-v2", security: ["bearer"], body: body ) end |
#fb_upsert_adset(body:, **_opts) ⇒ Object
Upsert adset
Create or update a Facebook ad set
409 410 411 412 413 414 415 416 |
# File 'lib/high_level/resources/ad_manager.rb', line 409 def fb_upsert_adset(body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/adsets", security: ["bearer"], body: body ) end |
#fb_upsert_campaign(body:, **_opts) ⇒ Object
Upsert campaign
Create or update a Facebook campaign
397 398 399 400 401 402 403 404 |
# File 'lib/high_level/resources/ad_manager.rb', line 397 def fb_upsert_campaign(body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/campaigns", security: ["bearer"], body: body ) end |
#fb_upsert_pixel(body:, **_opts) ⇒ Object
Upsert conversion pixel
Create or update a Facebook conversion pixel configuration
252 253 254 255 256 257 258 259 |
# File 'lib/high_level/resources/ad_manager.rb', line 252 def fb_upsert_pixel(body:, **_opts) request( method: :put, path: "/ad-publishing/facebook/pixels", security: ["bearer"], body: body ) end |
#google_create_integration(body:, **_opts) ⇒ Object
Create Google integration
Create a Google Ads integration for a location
671 672 673 674 675 676 677 678 |
# File 'lib/high_level/resources/ad_manager.rb', line 671 def google_create_integration(body:, **_opts) request( method: :post, path: "/ad-publishing/google/integration", security: ["bearer"], body: body ) end |
#google_create_offline_user_list_job(body:, **_opts) ⇒ Object
Create offline user list job
Create a job to upload users to a Google customer match list
864 865 866 867 868 869 870 871 |
# File 'lib/high_level/resources/ad_manager.rb', line 864 def google_create_offline_user_list_job(body:, **_opts) request( method: :post, path: "/ad-publishing/google/segments/offline-user-list-job", security: ["bearer"], body: body ) end |
#google_delete_ad_account(ad_account_id:, body:, **_opts) ⇒ Object
Delete ad account
Remove a Google Ads account connection from a location
719 720 721 722 723 724 725 726 |
# File 'lib/high_level/resources/ad_manager.rb', line 719 def google_delete_ad_account(ad_account_id:, body:, **_opts) request( method: :delete, path: "/ad-publishing/google/ad-accounts/#{ad_account_id}", security: ["bearer"], body: body ) end |
#google_delete_conversion(conversion_id:, location_id: nil, **_opts) ⇒ Object
Delete conversion
Delete a Google Ads conversion action by ID
647 648 649 650 651 652 653 654 |
# File 'lib/high_level/resources/ad_manager.rb', line 647 def google_delete_conversion(conversion_id:, location_id: nil, **_opts) request( method: :delete, path: "/ad-publishing/google/conversions/#{conversion_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_delete_segment(segment_id:, location_id: nil, type: nil, **_opts) ⇒ Object
Delete segment
Delete a Google Ads audience segment by ID
852 853 854 855 856 857 858 859 |
# File 'lib/high_level/resources/ad_manager.rb', line 852 def google_delete_segment(segment_id:, location_id: nil, type: nil, **_opts) request( method: :delete, path: "/ad-publishing/google/segments/#{segment_id}", security: ["bearer"], params: { "locationId" => location_id, "type" => type }.compact ) end |
#google_get_ad_account_details(ad_account_id:, location_id: nil, **_opts) ⇒ Object
Get ad account details
Retrieve details of a specific Google Ads account
707 708 709 710 711 712 713 714 |
# File 'lib/high_level/resources/ad_manager.rb', line 707 def google_get_ad_account_details(ad_account_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/ad-accounts/#{ad_account_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_ad_accounts(location_id: nil, type: nil, **_opts) ⇒ Object
Get Google ad accounts
Retrieve Google Ads accounts available for the connected user
695 696 697 698 699 700 701 702 |
# File 'lib/high_level/resources/ad_manager.rb', line 695 def google_get_ad_accounts(location_id: nil, type: nil, **_opts) request( method: :get, path: "/ad-publishing/google/ad-accounts", security: ["bearer"], params: { "locationId" => location_id, "type" => type }.compact ) end |
#google_get_assets(location_id: nil, type: nil, id: nil, advertiser_only: nil, **_opts) ⇒ Object
Get assets
Retrieve Google Ads creative assets for a location
767 768 769 770 771 772 773 774 |
# File 'lib/high_level/resources/ad_manager.rb', line 767 def google_get_assets(location_id: nil, type: nil, id: nil, advertiser_only: nil, **_opts) request( method: :get, path: "/ad-publishing/google/assets", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "id" => id, "advertiserOnly" => advertiser_only }.compact ) end |
#google_get_audience_by_id(audience_id:, location_id: nil, **_opts) ⇒ Object
Get audience by ID
Retrieve a specific Google Ads combined audience by ID
900 901 902 903 904 905 906 907 |
# File 'lib/high_level/resources/ad_manager.rb', line 900 def google_get_audience_by_id(audience_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/audiences/#{audience_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_audiences(location_id: nil, **_opts) ⇒ Object
Get audiences
Retrieve Google Ads combined audiences for a location
876 877 878 879 880 881 882 883 |
# File 'lib/high_level/resources/ad_manager.rb', line 876 def google_get_audiences(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/audiences", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_campaign_by_id(ad_id:, location_id: nil, **_opts) ⇒ Object
Get Google campaign by ID
Retrieve a specific Google Ads campaign by ID
924 925 926 927 928 929 930 931 |
# File 'lib/high_level/resources/ad_manager.rb', line 924 def google_get_campaign_by_id(ad_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/ads/#{ad_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_campaign_reporting(campaign_id:, location_id: nil, start_date: nil, end_date: nil, **_opts) ⇒ Object
Get campaign reporting
Retrieve reporting metrics for a specific Google campaign
599 600 601 602 603 604 605 606 |
# File 'lib/high_level/resources/ad_manager.rb', line 599 def google_get_campaign_reporting(campaign_id:, location_id: nil, start_date: nil, end_date: nil, **_opts) request( method: :get, path: "/ad-publishing/google/reporting/campaign/#{campaign_id}", security: ["bearer"], params: { "locationId" => location_id, "startDate" => start_date, "endDate" => end_date }.compact ) end |
#google_get_conversion_by_id(conversion_id:, location_id: nil, **_opts) ⇒ Object
Get conversion by ID
Retrieve a specific Google Ads conversion action by ID
635 636 637 638 639 640 641 642 |
# File 'lib/high_level/resources/ad_manager.rb', line 635 def google_get_conversion_by_id(conversion_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/conversions/#{conversion_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_conversion_goals(location_id: nil, **_opts) ⇒ Object
Get conversion goals
Retrieve Google Ads conversion goals for a location
936 937 938 939 940 941 942 943 |
# File 'lib/high_level/resources/ad_manager.rb', line 936 def google_get_conversion_goals(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/conversion-goals", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_conversions(location_id: nil, type: nil, conversion_type: nil, category: nil, start_date: nil, end_date: nil, **_opts) ⇒ Object
Get conversions
Retrieve Google Ads conversion actions for a location
611 612 613 614 615 616 617 618 |
# File 'lib/high_level/resources/ad_manager.rb', line 611 def google_get_conversions(location_id: nil, type: nil, conversion_type: nil, category: nil, start_date: nil, end_date: nil, **_opts) request( method: :get, path: "/ad-publishing/google/conversions", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "conversionType" => conversion_type, "category" => category, "startDate" => start_date, "endDate" => end_date }.compact ) end |
#google_get_current_user(location_id: nil, **_opts) ⇒ Object
Get current Google user
Retrieve the authenticated Google user info for a location
683 684 685 686 687 688 689 690 |
# File 'lib/high_level/resources/ad_manager.rb', line 683 def google_get_current_user(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/me", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_entity(location_id: nil, type: nil, campaign_id: nil, ad_group_id: nil, entity_type: nil, search_id: nil, start_date: nil, end_date: nil, selected_ad_account_id: nil, **_opts) ⇒ Object
Get entities
Retrieve Google campaigns, ad groups, or ads based on entity type
791 792 793 794 795 796 797 798 |
# File 'lib/high_level/resources/ad_manager.rb', line 791 def google_get_entity(location_id: nil, type: nil, campaign_id: nil, ad_group_id: nil, entity_type: nil, search_id: nil, start_date: nil, end_date: nil, selected_ad_account_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/entity", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "campaignId" => campaign_id, "adGroupId" => ad_group_id, "entityType" => entity_type, "searchId" => search_id, "startDate" => start_date, "endDate" => end_date, "selectedAdAccountId" => selected_ad_account_id }.compact ) end |
#google_get_integration(location_id: nil, **_opts) ⇒ Object
Get Google integration
Retrieve the Google Ads integration details for a location
659 660 661 662 663 664 665 666 |
# File 'lib/high_level/resources/ad_manager.rb', line 659 def google_get_integration(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/integration", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#google_get_keyword_ideas(body:, location_id: nil, **_opts) ⇒ Object
Get keyword ideas
Retrieve keyword suggestions for Google Ads campaigns
754 755 756 757 758 759 760 761 762 |
# File 'lib/high_level/resources/ad_manager.rb', line 754 def google_get_keyword_ideas(body:, location_id: nil, **_opts) request( method: :post, path: "/ad-publishing/google/keyword-ideas", security: ["bearer"], params: { "locationId" => location_id }.compact, body: body ) end |
#google_get_reporting(location_id: nil, group_by: nil, start_date: nil, end_date: nil, type: nil, fields: nil, **_opts) ⇒ Object
Get reporting data
Retrieve aggregated Google Ads reporting metrics for a location
575 576 577 578 579 580 581 582 |
# File 'lib/high_level/resources/ad_manager.rb', line 575 def google_get_reporting(location_id: nil, group_by: nil, start_date: nil, end_date: nil, type: nil, fields: nil, **_opts) request( method: :get, path: "/ad-publishing/google/reporting", security: ["bearer"], params: { "locationId" => location_id, "groupBy" => group_by, "startDate" => start_date, "endDate" => end_date, "type" => type, "fields" => fields }.compact ) end |
#google_get_reporting_list(location_id: nil, list_type: nil, start_date: nil, end_date: nil, campaign_id: nil, type: nil, **_opts) ⇒ Object
Get reporting list
Retrieve a list of Google campaigns or ad groups with reporting data
587 588 589 590 591 592 593 594 |
# File 'lib/high_level/resources/ad_manager.rb', line 587 def google_get_reporting_list(location_id: nil, list_type: nil, start_date: nil, end_date: nil, campaign_id: nil, type: nil, **_opts) request( method: :get, path: "/ad-publishing/google/reporting/list", security: ["bearer"], params: { "locationId" => location_id, "listType" => list_type, "startDate" => start_date, "endDate" => end_date, "campaignId" => campaign_id, "type" => type }.compact ) end |
#google_get_segment_by_id(segment_id:, location_id: nil, type: nil, **_opts) ⇒ Object
Get segment by ID
Retrieve a specific Google Ads audience segment by ID
840 841 842 843 844 845 846 847 |
# File 'lib/high_level/resources/ad_manager.rb', line 840 def google_get_segment_by_id(segment_id:, location_id: nil, type: nil, **_opts) request( method: :get, path: "/ad-publishing/google/segments/#{segment_id}", security: ["bearer"], params: { "locationId" => location_id, "type" => type }.compact ) end |
#google_get_segments(location_id: nil, type: nil, **_opts) ⇒ Object
Get segments
Retrieve Google Ads audience segments for a location
815 816 817 818 819 820 821 822 |
# File 'lib/high_level/resources/ad_manager.rb', line 815 def google_get_segments(location_id: nil, type: nil, **_opts) request( method: :get, path: "/ad-publishing/google/segments", security: ["bearer"], params: { "locationId" => location_id, "type" => type }.compact ) end |
#google_get_target_interests(location_id: nil, type: nil, advertising_channel_type: nil, **_opts) ⇒ Object
Get target interests
Retrieve affinity and in-market audience options for Google Ads targeting
803 804 805 806 807 808 809 810 |
# File 'lib/high_level/resources/ad_manager.rb', line 803 def google_get_target_interests(location_id: nil, type: nil, advertising_channel_type: nil, **_opts) request( method: :get, path: "/ad-publishing/google/target-interests", security: ["bearer"], params: { "locationId" => location_id, "type" => type, "advertisingChannelType" => advertising_channel_type }.compact ) end |
#google_publish_ad(ad_id:, **_opts) ⇒ Object
Publish ad
Publish a Google ad and push it live
731 732 733 734 735 736 737 |
# File 'lib/high_level/resources/ad_manager.rb', line 731 def google_publish_ad(ad_id:, **_opts) request( method: :post, path: "/ad-publishing/google/ads/#{ad_id}/publish", security: ["bearer"] ) end |
#google_search_targeting(type: nil, query: nil, location_id: nil, **_opts) ⇒ Object
Search targeting options
Search Google geo-locations for ad targeting
742 743 744 745 746 747 748 749 |
# File 'lib/high_level/resources/ad_manager.rb', line 742 def google_search_targeting(type: nil, query: nil, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/google/targeting/search", security: ["bearer"], params: { "type" => type, "query" => query, "locationId" => location_id }.compact ) end |
#google_upsert_assets(body:, **_opts) ⇒ Object
Upsert assets
Create or update Google Ads creative assets
779 780 781 782 783 784 785 786 |
# File 'lib/high_level/resources/ad_manager.rb', line 779 def google_upsert_assets(body:, **_opts) request( method: :post, path: "/ad-publishing/google/assets", security: ["bearer"], body: body ) end |
#google_upsert_audience(body:, **_opts) ⇒ Object
Upsert audience
Create or update a Google Ads combined audience
888 889 890 891 892 893 894 895 |
# File 'lib/high_level/resources/ad_manager.rb', line 888 def google_upsert_audience(body:, **_opts) request( method: :put, path: "/ad-publishing/google/audiences", security: ["bearer"], body: body ) end |
#google_upsert_campaign(body:, **_opts) ⇒ Object
Upsert Google campaign
Create or update a full Google Ads campaign structure
912 913 914 915 916 917 918 919 |
# File 'lib/high_level/resources/ad_manager.rb', line 912 def google_upsert_campaign(body:, **_opts) request( method: :put, path: "/ad-publishing/google/ads", security: ["bearer"], body: body ) end |
#google_upsert_conversion(body:, **_opts) ⇒ Object
Upsert conversion
Create or update a Google Ads conversion action
623 624 625 626 627 628 629 630 |
# File 'lib/high_level/resources/ad_manager.rb', line 623 def google_upsert_conversion(body:, **_opts) request( method: :put, path: "/ad-publishing/google/conversions", security: ["bearer"], body: body ) end |
#google_upsert_segment(body:, location_id: nil, type: nil, **_opts) ⇒ Object
Upsert segment
Create or update a Google Ads audience segment
827 828 829 830 831 832 833 834 835 |
# File 'lib/high_level/resources/ad_manager.rb', line 827 def google_upsert_segment(body:, location_id: nil, type: nil, **_opts) request( method: :put, path: "/ad-publishing/google/segments", security: ["bearer"], params: { "locationId" => location_id, "type" => type }.compact, body: body ) end |
#li_create_integration(body:, **_opts) ⇒ Object
Create LinkedIn integration
Create a LinkedIn Ads integration for a location with ad account details
960 961 962 963 964 965 966 967 |
# File 'lib/high_level/resources/ad_manager.rb', line 960 def li_create_integration(body:, **_opts) request( method: :post, path: "/ad-publishing/linkedin/integration", security: ["bearer"], body: body ) end |
#li_create_lead_form(body:, location_id: nil, **_opts) ⇒ Object
Create lead form
Create a new LinkedIn lead gen form for an ad account
1080 1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'lib/high_level/resources/ad_manager.rb', line 1080 def li_create_lead_form(body:, location_id: nil, **_opts) request( method: :post, path: "/ad-publishing/linkedin/#{account_id}/form", security: ["bearer"], params: { "locationId" => location_id }.compact, body: body ) end |
#li_delete_ad_account(location_id: nil, ad_account_id: nil, **_opts) ⇒ Object
Delete ad account
Remove a LinkedIn ad account connection from a location
996 997 998 999 1000 1001 1002 1003 |
# File 'lib/high_level/resources/ad_manager.rb', line 996 def li_delete_ad_account(location_id: nil, ad_account_id: nil, **_opts) request( method: :delete, path: "/ad-publishing/linkedin/ad-account", security: ["bearer"], params: { "locationId" => location_id, "adAccountId" => ad_account_id }.compact ) end |
#li_get_ad_account_details(location_id: nil, ad_account_id: nil, **_opts) ⇒ Object
Get ad account details
Retrieve details of a specific LinkedIn ad account
984 985 986 987 988 989 990 991 |
# File 'lib/high_level/resources/ad_manager.rb', line 984 def li_get_ad_account_details(location_id: nil, ad_account_id: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/ad-account", security: ["bearer"], params: { "locationId" => location_id, "adAccountId" => ad_account_id }.compact ) end |
#li_get_ad_accounts(location_id: nil, **_opts) ⇒ Object
Get LinkedIn ad accounts
Retrieve LinkedIn Ads accounts available for the connected user
972 973 974 975 976 977 978 979 |
# File 'lib/high_level/resources/ad_manager.rb', line 972 def li_get_ad_accounts(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/ad-accounts", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#li_get_ad_analytics(location_id: nil, pivot: nil, group_by: nil, start_date: nil, end_date: nil, entity_urns: nil, fields: nil, **_opts) ⇒ Object
Get ad analytics
Retrieve LinkedIn Ads analytics data with configurable pivot and time grouping
1106 1107 1108 1109 1110 1111 1112 1113 |
# File 'lib/high_level/resources/ad_manager.rb', line 1106 def li_get_ad_analytics(location_id: nil, pivot: nil, group_by: nil, start_date: nil, end_date: nil, entity_urns: nil, fields: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/reporting", security: ["bearer"], params: { "locationId" => location_id, "pivot" => pivot, "groupBy" => group_by, "startDate" => start_date, "endDate" => end_date, "entityUrns" => entity_urns, "fields" => fields }.compact ) end |
#li_get_campaign_group(ad_id:, location_id: nil, **_opts) ⇒ Object
Get ad campaign group
Retrieve a LinkedIn ad campaign group by ID
1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/high_level/resources/ad_manager.rb', line 1020 def li_get_campaign_group(ad_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/ads/#{ad_id}", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#li_get_campaign_group_reporting(campaign_group_id:, location_id: nil, start_date: nil, end_date: nil, fields: nil, **_opts) ⇒ Object
Get campaign group reporting
Retrieve reporting metrics for a specific LinkedIn campaign group
1130 1131 1132 1133 1134 1135 1136 1137 |
# File 'lib/high_level/resources/ad_manager.rb', line 1130 def li_get_campaign_group_reporting(campaign_group_id:, location_id: nil, start_date: nil, end_date: nil, fields: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/reporting/campaign-group/#{campaign_group_id}", security: ["bearer"], params: { "locationId" => location_id, "startDate" => start_date, "endDate" => end_date, "fields" => fields }.compact ) end |
#li_get_current_user(location_id: nil, **_opts) ⇒ Object
Get current LinkedIn user
Retrieve the authenticated LinkedIn user info for a location
1008 1009 1010 1011 1012 1013 1014 1015 |
# File 'lib/high_level/resources/ad_manager.rb', line 1008 def li_get_current_user(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/me", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#li_get_integration(location_id: nil, **_opts) ⇒ Object
Get LinkedIn integration
Retrieve the LinkedIn Ads integration details for a location
948 949 950 951 952 953 954 955 |
# File 'lib/high_level/resources/ad_manager.rb', line 948 def li_get_integration(location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/integration", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#li_get_lead_forms(account_id:, location_id: nil, **_opts) ⇒ Object
Get lead forms
Retrieve LinkedIn lead gen forms for an ad account
1068 1069 1070 1071 1072 1073 1074 1075 |
# File 'lib/high_level/resources/ad_manager.rb', line 1068 def li_get_lead_forms(account_id:, location_id: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/#{account_id}/forms", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#li_get_reporting_list(location_id: nil, list_type: nil, campaign_id: nil, campaign_group_id: nil, start_date: nil, end_date: nil, fields: nil, **_opts) ⇒ Object
Get reporting list
Retrieve a list of LinkedIn campaigns or campaign groups with reporting data
1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/high_level/resources/ad_manager.rb', line 1118 def li_get_reporting_list(location_id: nil, list_type: nil, campaign_id: nil, campaign_group_id: nil, start_date: nil, end_date: nil, fields: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/reporting/list", security: ["bearer"], params: { "locationId" => location_id, "listType" => list_type, "campaignId" => campaign_id, "campaignGroupId" => campaign_group_id, "startDate" => start_date, "endDate" => end_date, "fields" => fields }.compact ) end |
#li_publish_campaign_group(ad_id:, body:, **_opts) ⇒ Object
Publish ad campaign group
Publish a LinkedIn ad campaign group and push it live
1032 1033 1034 1035 1036 1037 1038 1039 |
# File 'lib/high_level/resources/ad_manager.rb', line 1032 def li_publish_campaign_group(ad_id:, body:, **_opts) request( method: :post, path: "/ad-publishing/linkedin/ads/#{ad_id}/publish", security: ["bearer"], body: body ) end |
#li_search_targeting(location_id: nil, facet: nil, query: nil, q: nil, **_opts) ⇒ Object
Search targeting options
Search LinkedIn targeting facets such as locations, industries, and job titles
1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/high_level/resources/ad_manager.rb', line 1056 def li_search_targeting(location_id: nil, facet: nil, query: nil, q: nil, **_opts) request( method: :get, path: "/ad-publishing/linkedin/targeting/search", security: ["bearer"], params: { "locationId" => location_id, "facet" => facet, "query" => query, "q" => q }.compact ) end |
#li_update_ad_status(ad_id:, body:, location_id: nil, **_opts) ⇒ Object
Update ad status
Pause or resume a LinkedIn ad, campaign, or ad group
1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/high_level/resources/ad_manager.rb', line 1093 def li_update_ad_status(ad_id:, body:, location_id: nil, **_opts) request( method: :patch, path: "/ad-publishing/linkedin/#{ad_id}/status", security: ["bearer"], params: { "locationId" => location_id }.compact, body: body ) end |
#li_upsert_campaign_group(body:, **_opts) ⇒ Object
Upsert ad campaign group
Create or update a LinkedIn ad campaign group with campaigns and ads
1044 1045 1046 1047 1048 1049 1050 1051 |
# File 'lib/high_level/resources/ad_manager.rb', line 1044 def li_upsert_campaign_group(body:, **_opts) request( method: :put, path: "/ad-publishing/linkedin/ads", security: ["bearer"], body: body ) end |