Home Services
Client-side integration
Install a JavaScript snippet and render results directly in the browser.
Setup
MyAdOptimizer.com will provide a Javascript snippet back to you to add to your new Thank You page as follows:
<script src="https://cdn.myadoptimizer.com/maojsfiles/landingpagesjs/{{LandingPageToken}}.js"></script>- LandingPageToken: Token that will be provided by your account manager
- Div Element: Aggregated results will be rendered automatically once the thank you page loads on the user browser. An HTML DIV element with ID=“target” must be created in the Thank-You page as results will be rendered inside that element.
- Default CSS Theme: MyAdOptimizer provides a default CSS; however, if you wish to change it and create your own to match your landing page theme, please contact your account manager
- Device Type (Desktop or Mobile): This is automatically inferred when using Client Side (JavaScript) integration
To ensure that each ad network gets the parameter values they require we ask that you setup a new Thank You page and pass the below parameters in the query string.
The aggregated results will be rendered once they Thank You page loads on the user’s browser.
Generic query string parameters
| Parameter | Type | Description | Requirement |
|---|---|---|---|
SourceID | string | Tracking variable | Required |
ExtClickID | string | Tracking variable | Optional |
CustomVar1 | string | Generic tracking variable (max length 75) | Optional |
CustomVar2 | string | Generic tracking variable (max length 75) | Optional |
CustomVar3 | string | Generic tracking variable (max length 75) | Optional |
CustomVar4 | string | Generic tracking variable (max length 75) | Optional |
CustomVar5 | string | Generic tracking variable (max length 75) | Optional |
Specific Query String Parameters for Home Services
| Params Names | Data Type | Allowed Values |
|---|---|---|
| ZipCode* | string | 5 char US zip code |
| State* | string | 2 char US state code (Uppercase) |
| ProjectServiceType* | string | Roofing, Gutters, Windows/Doors, Kitchen, Bathroom, Flooring, Home Security, Pest Control, Lawn Care, Siding |
| ProjectTypesConcentration* | string | See ProjectTypesConcentration values below. |
| ProjectScope* | string | Replace New, Repair Existing, Other |
| ProjectTimeline* | string | Immediate, Within 2 weeks, Within 1 month, Unsure |
| HomeOwner* | string | Yes, No |
| Gender* | string | Male, Female, Other |
| Married* | string | Yes, No |
| MilitaryStatus* | string | Yes, No |
| Age | integer | 1 - 99 |
| SolarPowerBill* | integer | $0 - $99, $100 - $149, $150 - $199, $200 - $249, $250 - $349, $350 - $399, $400 - $449, $450 - $499, $500 - $1000+ |
| SolarRoofingType* | string | Full Sun, Partially Shaded, Mostly Shaded, Not Sure |
| FName ± | string | |
| LName ± | string | |
| Email ± | string | |
| Phone ± | string | |
| Address ± | string | |
| City ± | string | |
| MediaChannel | string | Social, Facebook, Native, Email, Display, SEM, SEO, SMS, Push, Affiliate, ChannelA, ChannelB, ChannelC, ChannelD, ChannelE |
*Case Sensitive
±PII Fields - These values are not constraints and will not be evaluated by MAO
ProjectTypesConcentration values
Allowed values for ProjectTypesConcentration depend on the ProjectServiceType selected.
| ProjectServiceType | Allowed ProjectTypesConcentration values |
|---|---|
| Roofing | Asphalt Only, Tile Only, Metal Only, Foam Only, Tar & Gravel Only, Wood Shingles Only, Slate Only |
| Gutters | Residential, Commercial |
| Windows/Doors | 1 to 10 Windows, 1 to 10 Doors |
| Kitchen | Cabinet Refacing, Countertops, Plumbing, Kitchen Remodel |
| Bathroom | Bathroom Remodel, Bathtub to Shower Only, Walk-In Shower Only, Walk-In Tub Only |
| Flooring | Kitchen Flooring Only, Bathroom Flooring Only, Basement Flooring Only, Garage Flooring Only, Outdoor Flooring Only - Patio/Deck coatings |
| Home Security | Security Intrusion, Fire Detection |
| Pest Control | Bugs/Insects, Rodents, Birds/Bats, Small Animals, Termites, Ants, Bees/Wasps, Fleas, Spiders |
| Lawn Care | Landscaping, Lawn Care, Gardening, Sod Installation, Tree Planting, Artificial Turf Installation |
| Siding | Aluminum, Not sure/other, Stucco, Vinyl, Wood |
LocalStorage Integration
In order to use LocalStorage instead Querystring, set up the parameters names & values stated above by adding them using a MAO JS function called setMAOLocalStorageValue. This method expects a key/value pair.
The function setMAOLocalStorageValue need two paramets
- Property name & Property value
For example:
/*@param{string} sParam - Property Name@param{*} sValue - Property Value*/setMAOLocalStorageValue('State', CA);setMAOLocalStorageValue('ZipCode', 90291);// Output: Added value succesfullyOnce you have set up all parameters values, you need to invoke the function initMAO to render all campaigns.
initMAO function need two parameters
- Target HTML ID & Render mode For Example:
//HTML Structure<div id="target"> Rendered campaings ... </div>/*@param{string} TargetHtmlControlID@param{number} GlobalRenderMode (1- Live , 2- Test)*/InitMAO('target', 1);Click to call RenderMode 3
Callback properties
-
CampaignPhoneNumber: New A unique phone number assigned to the campaign to track and measure calls.
-
CallToAction: New Text displayed on a clickable button or element, encouraging users to initiate a phone call.
-
AdResultCallStatusID: New An ID representing the campaign’s call status, where:
| ID | Status | Allows calls |
|---|---|---|
| 1 | Click To Call is Active | TRUE |
| 8 | Campaign is out of schedule | FALSE |
| 13 | Click to Call Monthly Cap Reached | FALSE |
| 14 | Click to Call Daily Cap reached | FALSE |
| 15 | Click to Call is Off | FALSE |
| 16 | Campaign is off | FALSE |
Example Callback
{ "advertiserId": "100", "AdvertiserName": "Advertiser Name 01 - 100", "AdNetworkAPIID": 76, "Title": "Fixed Mortgage Rates from 5.7 rate 6.1 Apr", "AdCopyVersion": 1, "Description": "FHA, VA, 30 Year Fixed, 15 Year Fixed <br /> Cash Out and Home Equity Options <br /> View Rates & Payments <br /> Calculate Home Equity Payments", "CPC": 15.75, "BaseCPC": 15, "Logo": "https://cdn.myadoptimizer.com/maojsfiles/images/LogoAdvertiser_000000_00000000-0000-0000-0000-000000000000.jpg", "BrandName": "Advertiser Name 01", "NetworkSort": 1, "NetworkAdID": "1284", "DisplayUrl": "Advertiser Name 01.com/MortgageRates", "PayLoad": "", "Weight": 15.75, "CB": "XXXXXXXXXXXXXXXXXXXXXXX", "M": "XXXXXXXXXXXXXXXXXXXXXXX", "BidModifierPercentange": 5, "BidFloor": 0, "RequestDuration": 539, "AdResultLogStatusId": 1, "AdNetworkName": "MAO Open Exchange", "SourceID": "", "ExtClickId": "", "ExtSearchID": "", "LandingPageURL": "ThankYouDemo.html", "bidModDescription": [ "Consumer Credit: Excellent - Value: 5%" ], "CustomVar1": "", "CustomVar2": "", "CustomVar3": "", "CustomVar4": "", "CustomVar5": "", "DailyFilledRate": 0, "CampaignDailyCap": 1500, "CampaignPhoneNumber": "+11234567890", "CallToAction": "Call Now", "AdResultCallStatusID": 1, "DestinationURL": "https://maofunctionstest.azurewebsites.net/api/MAOHttpRedirect?src=https%3A%2F%2Fwww.Advertiser Name 01.com%2Fmortgagerates%3Futm_source%3Ddirectbidder1284&LandingPageID=10&EventID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&AdNetworkAPIID=76&cpc=15.75&Brand=Advertiser Name 01&Title=Fixed Mortgage Rates from 5.7 rate 6.1 Apr&CB=XXXXXXXXXXXXXXXXXXXXXXX&M=XXXXXXXXXXXXXXXXXXXXXXX&Weight=15.75&BidModifiers=5&NetworkAdID=1284&SourceID=&LandingPageURL=ThankYouDemo.html&AdId=100&AdCopyVersion=1&CustomVar1=&CustomVar2=&CustomVar3=&CustomVar4=&CustomVar5=", "findIndex": 0}External Ad Networks Setup Optional
To integrate the following Ad Networks, MAO will need the following values.
Media Alpha
api_tokenplacement_id
Transparent.ly
pubcampaignId
Clicks.NET
AffcamidKey
Quinstreet
Src