How to Implement a Social Bid Modifier 2.0
Overview
This document gives the steps to implement Social Bid Modifiers 2.0. At times the setup could get a bit confusing with the limitations we have in the Meta API at this stage. We do have processes to work around these limitations. If at any point you are stuck, please reach out to your Alli Solutions Engineering Partner.
Social Bid Modifiers (Multipliers) are not compatible with ASC (Advantage+ Shopping Campaigns) at this time without additional whitelisting. Contact your Meta Rep to get whitelisted.
Please note for your Meta reps, that the Alli App that applies bid modifiers is already whitelisted for bid modifiers, and ASC bid modifiers is an additional whitelist that the reps must implement for your specific account. One of our meta reps has kindly provided the attached instructions for their internal process.
The App ID can be found via the Actions Dev (PMG Datawarehouse) - Meta Developer App
1pass note, reach out to the document owner or your Alli Solutions pod counterpart to access.
Getting Setup
Building your Bid Sheet
Make a copy of the sheet: https://docs.google.com/spreadsheets/d/1dEhqHBC2HccfKk0fpK9-n4vphsBd75wKO8C60GyZn9g/edit#gid=0 . Please do not use the original. Kindly use only the copy.
While making a copy make sure to click the “Share with the same people” checkbox. Ensure that your client creds Google Service Account has editor access to your sheet. You can find the service accounts in this sheet. If you have any questions, please reach out to the tool owner at the top of the page.
Please read the “Bid Notes” section below before filling your sheet.
Every tab in the sheet represents a Bid Multiplier Category and each category has different bid multipliers. You can only have the tabs you need and delete the rest of them. Likewise, you can only use the multipliers you need and delete the rest of them or set them to 1. For example, if you just want to set bids based on gender and publisher platform, you can delete the tabs except gender, publisher_platform, and campaign_ids. Also, if you just want to bid down 90% for male, but you don’t want to change the bids for female, you can delete female altogether or set it to 1 (if you think you would modify the bids for female at a later point in time)
Please do not change the names of the tabs or modifier types. Facebook understands them in a certain way and changing the cases, spelling, or underscores might cause the app to error. Use them as is from the Template and delete whatever is not needed.
The last tab, “Campaign IDs”, is to provide the campaign IDs for applying the multipliers. Alli will apply the bids to all Adsets under the given campaigns. The Meta API has a limitation that there is no flag in Alli data which accurately reflects the status of the adsets. So you might see bids applied to paused adsets. If you see such discrepancies and want to control them, please use this SQL template in the view_name field (The campaign and adgroup IDs list is expandable, so please add as many entries as required):
CODE(SELECT DISTINCT adgroup_id FROM {client_slug}_core.adgroup_performance WHERE publisher_platform = 'Facebook' AND LOWER(adgroup_status) = 'active' AND campaign_id IN ('23848107234960291','another_campaign_Id') AND adgroup_id IN ('your_first_adset','your_second_adset'))
Remember to change the client_slug in line #4 and the campaign and adset IDs in lines #8 and #9 and always remember to wrap the SQL in paranthesis.
Copy the sheet ID from the URL and save that somewhere as we would need it while setting up the marketplace app.
Building Your Action
Navigate to Actions in the left side navigation.
Click on the blue Create Action button.
Filter or search for the
Adset Apply Bid Modifier
action type, and click the blueSelect
button.
Name your Action and select the Authenticated Account, the user account you'd like to use for making changes. The user associated with this account should have access to the relevant ad accounts.
Start by giving your action a descriptive name that reflects the changes you plan to make.
Tip: If your desired account isn't listed, or you need to create a new one, refer to the authentication documentation for instructions on how to authenticate a partner platform.
Set Datasource: You'll be selecting the "Alli Marketplace" option. Copy the Action ID and save that for later use.
Review Action: Click Save to continue setup once you are complete.. Review for accuracy.
Publish: Select the blue Publish button.
Building Your Marketplace App
From the left-hand side navigation, select Marketplace. This will show all of the custom apps that are currently set up for the selected customer.
From the left hand side navigation, select Browse. This will show a list of available templates you can use.
Once in your client, click browse for templates and select “Social Bid Modifier 2.0” and then click the “Install App” button on the top right of the screen.
3. Name your app, set a schedule (if you want this to run automatically), and don't forget to place your email in the "Notification Email" section to be notified if/when your pallet errors or is completed.
4. Fill out the template; refer to help text above or default text within the boxes for help, or use the handy guide below.
view_name: You have three options for this field, please choose the right one that best fits your needs.
If the campaign_ids tab in the Google Sheet is filled, Alli would apply the bids to all the active adsets under that campaign. In this case, the view_name field should contain the name of the datasource which has information of these adsets. If you are trying to apply bids to existing campaigns, you can input this field with
client_name_core.adgroup_performance
Occasionally we see clients wanting to launch a new campaign and immediately apply bids to all the adsets in that campaign. In this case, the view_name field should contain
client_name.facebookads_structure_adsets
. Be sure to force sync this datasource with the platform if you are trying to apply bids immediately after launching a new campaign. Instructions to force load a datasource can be found in this document.If the campaign_ids tab in the sheet is not filled, Alli would look for a SQL which goes in the view_name field (this field) of your app. This should be the report name (or sql query) in bigquery or redshift that points to the adset id's you'd like to apply bid modifiers to. The output of this SQL should be a singular column of adset ids like the example SQL below. Again, please do not forget to enclose the SQL in parantheses as shown below.
CODE(SELECT DISTINCT adgroup_id FROM {client_slug}_core.adgroup_performance WHERE publisher_platform = 'Facebook' AND LOWER(adgroup_status) = 'active' AND campaign_id IN ('23848107234960291','another_campaign_Id') AND adgroup_id IN ('your_first_adset','your_second_adset'))
origin: where is the date in your view above coming from? Primarily this will be redshift, so no change is necessary.
bid_modifier_floor: what is the lowest you'd like you final bid modifier to be?
because your final bid modifier is calculated by multiplying each of the single multipliers you set above, the final product may be lower than you want to go, so in cases like that, we'll replace any bid modifiers that are lower than your floor with your bid modifier floor. For example if the male gender bid modifier is 80% of the total spend, the facebook platform bid modifier is 80% of the total spend, and the desktop device bid modifier is 80% of the total spend, a male customer using facebook on a desktop device would only be allocated 80% x 80% x 80% = 51.2%. If you want to avoid bidding that low, you can set the floor to a number like 60% for example. So anytime the math goes below 60%, the floor value will be used in place of the actual bid value.
bid_data_sheet: The sheet ID of the Google sheet you created in Step 1
actions_id: The action ID of the action you created in Step 2.
run_type: Here you can choose either Test Run or Send to Actions.
With Test Run, we won’t send your modifiers to Facebook just yet, but we will run the process and provide you with a table of the final bids that you’d be sending to Facebook. They will be delivered to your slack channel.
With Send to Actions, once you’re happy with your modifiers, we’ll send your bid modifiers to Actions to apply them to your adsets. Make sure your actions_id is properly inputted for this to work!
slack_channel: The slack channel name to view your final bids that are being sent to facebook.
Put It All Together
Once you’ve created your app and your action, ensure that the action id you copied is placed into your Marketplace app.
Your app is all set! Once you run the app, please make sure to check your Alli Action run status. If there is an error in your bids, the app would run but the Alli action would fail. Checking Alli actions is important every time you add a new bid parameter into the mix, just to ensure that it is accepted by Facebook.
If the alli app fails, it would mostly give you details on why it failed. There are limitations in Meta like the number of bids we can send, the number of geos we can use etc. If you see an error, the app would give you a code and a message. If the code and the description are not helpful, please submit a Service Desk Ticket.
Questions or Issues?
Reach out to the Alli Solutions team on slack or submit a Data Services ticket here.
Bid Notes:
The current version of Social Bid Modifiers 2.0 has a few limitations. We will update here once those limitations have been resolved.
The bid adjustment should be from 0.09 to 1. You cannot set a bid modifier lower or higher.
You can only use one Geo Modifier at a time - Cities, or Regions, or countries. Using more than 1 geo modifier will produce erroneous results. We do not have a way to use cities and regions together for example. Only one geo bid tab should exist in the Google Sheet at any time.
The geo based modifier should be the last tab in your Google Sheet, the other modifiers can be tabbed in any order.
For Cities and Regions: Cities should be provided in the format “City, State, Country Code”. For example: “Dallas, Texas, US” - There are multiple Dallas cities in the US in different states (Crazy right?). So this format is essential for the app to understand which Dallas you are bidding for. Similarly for Regions (States), the format is: “State, Country Code” for example: “Texas, US”. Use only the two letter country code for cities, regions, and countries.
Bid names are case sensitive, so please use them as provided in the Master Google Sheet. For example, “Android” may not work, because Facebook only understands it as “android” with a lower case 'a'. The master sheet has all possible bids the way Facebook understands. So if you remove gender based bids and want to use them later, please copy them from the Master sheet instead of typing it yourself. Refer to Appendix A for the available Bid Parameters.
For locales, we currently only support the locale IDs. Please input the locale ID and not the locale name. Refer to Appendix B for all existing Locale IDs.
Appendix A - Available Bid Parameters:
Age | · age · age ranges · default |
Device Platform | · mobile · desktop |
Gender | · male · female · default |
Home Location | · cities · regions (States) · countries |
Locale | · locale IDs · locale group IDs |
Position Type | · audience_network_classic · · audience_network_rewarded_video · facebook_feed · facebook_right_hand_column · facebook_instant_article · facebook_instream_video · · facebook_suggested_video · facebook_marketplace · facebook_story · facebook_search · instagram_explore · instagram_igtv · instagram_story · instagram_stream · messenger_messenger_home · messenger_story |
Publisher Platform | · audience_network · messenger |
User Device | · iPad · iPhone |
User OS | · Android · Windows · Windows Phone · iOS |
Custom Audience | · Custom Audience ID |
Appendix B - Locale IDs:
Locale | Locale ID |
Afrikaans | 36 |
Albanian | 87 |
Arabic | 28 |
Armenian | 68 |
Azerbaijani | 53 |
Basque | 59 |
Belarusian | 54 |
Bengali | 45 |
Bosnian | 55 |
Bulgarian | 37 |
Catalan | 1 |
Cebuano | 56 |
Chinese (All) | 1004 |
Croatian | 38 |
Czech | 2 |
Danish | 4 |
Dutch | 14 |
English (All) | 1001 |
English (UK) | 24 |
English (US) | 6 |
Esperanto | 57 |
Estonian | 58 |
Faroese | 62 |
Filipino | 26 |
Finnish | 8 |
Flemish | 83 |
French (All) | 1003 |
French (Canada) | 44 |
French (France) | 9 |
Frisian | 63 |
Galician | 65 |
Georgian | 72 |
German | 5 |
Greek | 39 |
Guarani | 66 |
Gujarati | 67 |
Hebrew | 29 |
Hindi | 46 |
Hungarian | 30 |
Icelandic | 69 |
Indonesian | 25 |
Irish | 64 |
Italian | 10 |
Japanese | 11 |
Japanese (Kansai) | 70 |
Javanese | 71 |
Kannada | 75 |
Kazakh | 73 |
Khmer | 74 |
Korean | 12 |
Kurdish (Kurmanji) | 76 |
Latvian | 78 |
Lithuanian | 40 |
Macedonian | 79 |
Malay | 41 |
Malayalam | 50 |
Marathi | 81 |
Mongolian | 80 |
Nepali | 82 |
Norwegian (bokmal) | 13 |
Norwegian (nynorsk) | 84 |
Pashto | 85 |
Persian | 60 |
Polish | 15 |
Portuguese (All) | 1005 |
Portuguese (Brazil) | 16 |
Portuguese (Portugal) | 31 |
Punjabi | 47 |
Romanian | 32 |
Russian | 17 |
Serbian | 42 |
Simplified Chinese (China) | 20 |
Sinhala | 86 |
Slovak | 33 |
Slovenian | 34 |
Spanish | 23 |
Spanish (All) | 1002 |
Spanish (Spain) | 7 |
Swahili | 88 |
Swedish | 18 |
Tajik | 89 |
Tamil | 48 |
Telugu | 49 |
Thai | 35 |
Traditional Chinese (Hong Kong) | 21 |
Traditional Chinese (Taiwan) | 22 |
Turkish | 19 |
Ukrainian | 52 |
Urdu | 90 |
Uzbek | 91 |
Vietnamese | 27 |
Welsh | 3 |