How To See Where PMAX Is Spending Your Budget | Performance Max Channel Spend Allocation Script

  Рет қаралды 608

3B1

3B1

Күн бұрын

Пікірлер: 16
@DavidShapira-vq4ly
@DavidShapira-vq4ly Ай бұрын
Thanjs for the script. I still see wired data for one of my campaigns . its said that im not spending at all on gogle shopping and for the campaign i still saw that i spending money on google shopping
@aidsi3717
@aidsi3717 2 ай бұрын
Another great video! I have set this up but in the pie chart it shows search: 60% and shopping: 20% but below in the list it says Search: 20% and shopping: 60%. In the pie chart, search is in the yellow part and shopping is in the blue. Do you know why this is and which one I should go off?
@3b1agency
@3b1agency 2 ай бұрын
Hi, you're correct, thanks for pointing that out. There appears to be an error in the labelling of the 1st pie chart where search has been switched with shopping. It's an issue with the original Google Sheet. If you double click on the subtitle "Search" (the yellow pie chart area) in the chart and rename it "Shopping". Then rename the "Shopping" subtitle (the blue pie chart area) to "Search" that issue will be resolved.
@aidsi3717
@aidsi3717 2 ай бұрын
@@3b1agency Glad to hear, I was thinking it was just mines. Thank you. I'll be staying tuned for new videos from you!
@3b1agency
@3b1agency 2 ай бұрын
@@aidsi3717 Thanks, I'm glad to hear that!
@GiorgosSidiropoulos-l1h
@GiorgosSidiropoulos-l1h 3 ай бұрын
Great video! Can we use this in the MCC environment, or is it strictly for 1 account?
@3b1agency
@3b1agency 3 ай бұрын
This particular one is account by account. The following script from Mike Rhodes is a version that can work at an MCC level to do some of the same things as long as it has a product feed. Just a quick note, the script in the video is more comprehensive and I find it much more useful. // // PLEASE NOTE: this script is designed for PMax campaigns in MCC accounts with a product feed (ie ecommerce accounts ONLY) // Because all the data is held at the Listing Group level, it’s IMPOSSIBLE to get additional data for Lead Gen accounts // Please yell at Google, not me :) // // // version 8 MCC script (added split between Display & Search - thanks Tobias Hink for all your help! Look him up - the guy's a genius www.linkedin.com/in/tobias-hink/ // // // // INSTRUCTIONS: --- PLEASE READ --- // // COPY this template Google Sheet: // docs.google.com/spreadsheets/d/1igTja6inzVKh_yvQ5t_lv6EvRtaUYlFqNES-gmx0woI/copy // // now grab the URL of YOUR sheet & enter it below in the line (34) that starts 'let e =' (put the URL between the single quotes) // // name your script: WebSavvy: MCC pMax charts v8 (updates daily) // name your sheet: {MCC name} - pMax charts v8 (updates daily) // // authorise, save & run your script // once it’s all working, set the schedule to run daily // // thanks for reading :) function main(){ let e=SpreadsheetApp.openByUrl("docs.google.com/spreadsheets/d/1k4_HAVDUsQJTNWjldwHrjzsxMhSjLPLmQQ3VwIl_oBY/edit#gid=1204873604") // 0 ORDER BY campaign.id `),u=[];for(;m.hasNext();){let l=m.next(),{resourceName:p,name:h,id:R}=l.campaign,{costMicros:d,impressions:A,clicks:N,conversions:E,conversionsValue:v,videoViews:y,averageCpv:D}=l.metrics;o.push(R),u.push([r,c,h,R,d/1e6,A,N,E,v,y,D/1e6])}if(u.length>0&&t.getRange(t.getLastRow()+1,1,u.length,u[0].length).setValues(u),0===u.length)continue;let S=AdsApp.search(` SELECT campaign.name, campaign.id, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions, metrics.conversions_value, segments.asset_interaction_target.asset, segments.asset_interaction_target.interaction_on_this_asset FROM campaign WHERE segments.date DURING LAST_30_DAYS AND campaign.advertising_channel_type = "PERFORMANCE_MAX" AND segments.asset_interaction_target.interaction_on_this_asset != "TRUE" AND metrics.cost_micros > 0 ORDER BY campaign.id `),$=[];for(;S.hasNext();){let f=S.next(),{name:x,id:I}=f.campaign,{assetInteractionTarget:{asset:_}}=f.segments,{costMicros:C,impressions:L,clicks:O,conversions:T,conversionsValue:V}=f.metrics;$.push([r,x,I,_,C/1e6,L,O,T,V])}$.length>0&&s.getRange(s.getLastRow()+1,1,$.length,$[0].length).setValues($);let b=AdsApp.search(` SELECT campaign.name, campaign.id, asset_group.id, asset_group.name, asset_group.status, asset_group_listing_group_filter.type, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions, metrics.conversions_value FROM asset_group_product_group_view WHERE segments.date DURING LAST_30_DAYS AND asset_group_listing_group_filter.type != "SUBDIVISION" AND campaign.id IN ('${o.join("','")}') AND metrics.cost_micros > 0 ORDER BY campaign.id `),B=[];for(;b.hasNext();){let M=b.next(),{name:w,id:F,status:U}=M.assetGroup,{costMicros:Y,impressions:G,clicks:H,conversions:W,conversionsValue:k}=M.metrics;B.push([r,M.campaign.name,M.campaign.id,w,F,U,Y/1e6,G,H,W,k])}B.length>0&&a.getRange(a.getLastRow()+1,1,B.length,B[0].length).setValues(B);let j=AdsApp.search(` SELECT campaign.name, campaign.id, asset_group.id, asset_group.name, asset.resource_name, asset_group_asset.field_type, asset.source, asset.name, asset.text_asset.text, asset.image_asset.full_size.url, asset.youtube_video_asset.youtube_video_title, asset.youtube_video_asset.youtube_video_id FROM asset_group_asset WHERE campaign.id IN ('${o.join("','")}') `),z=[];for(;j.hasNext();){let K=j.next(),P="",X="",q="";K.asset.imageAsset&&(P=K.asset.imageAsset.fullSize.url),K.asset.youtubeVideoAsset&&(X=K.asset.youtubeVideoAsset.youtubeVideoId,q=K.asset.youtubeVideoAsset.youtubeVideoTitle);let{resourceName:J,source:Q,name:Z}=K.asset,{fieldType:ee}=K.assetGroupAsset;z.push([r,J,ee,Q,P,X,q,Z])}z.length>0&&i.getRange(i.getLastRow()+1,1,z.length,z[0].length).setValues(z)}}
@MarkJohnsonPPC
@MarkJohnsonPPC 2 ай бұрын
Error code: Anyone know what's up with it, 10/5/2024 8:01:07 PM Ga: Invalid input: null. Expected an object with fields { getMaxColumns: a function getMaxRows: a function getRange: a function insertColumnsAfter: a function insertRowsAfter: a function setFrozenRows: a function } at runReport (Code:92:10) at main (Code:81:3)
@3b1agency
@3b1agency 2 ай бұрын
Hi Mark, did you add the url for your own version of the Google Sheet? Does your campaign include product listings from merchant centre or is it solely leads focused?
@weblinkagency
@weblinkagency 4 ай бұрын
Thanks for the great script and video. One question - how can I convert the spend to dollars from pounds?
@3b1agency
@3b1agency 4 ай бұрын
Hi, I'm glad you found it useful! The script exports raw numbers, and the Google Sheet is actually set to $'s by default. All you have to do to change the currency is change the $ symbols in the sheet.
@KanishkSingh-xt6ny
@KanishkSingh-xt6ny 4 ай бұрын
Can we take out data for last 180 days? How can we modify it?
@3b1agency
@3b1agency 4 ай бұрын
Hi Kanishk, technically you can do that but it isn't very practical. You would have to change the dates manually every time before you rang it. Essentially you would have to swap out one of the date lines that start with "let date07" or "let date30" with code like the below. Adding in dates and in brackets. I wouldn't really advise it, but feel free to try to make the below work for your needs. let today = new Date(); let pastDate = new Date(); pastDate.setDate(today.getDate() - 180); let todayFormatted = Utilities.formatDate(today, AdsApp.currentAccount().getTimeZone(), 'yyyyMMdd'); let pastDateFormatted = Utilities.formatDate(pastDate, AdsApp.currentAccount().getTimeZone(), 'yyyyMMdd'); let date180 = ' segments.date BETWEEN ' + pastDateFormatted + ' AND ' + todayFormatted;
@DavidShapira-vq4ly
@DavidShapira-vq4ly Ай бұрын
i dont understand - its loo like all my spend is onli from search and google shopping - but i do have views which is views on youtube - so i understand that i waste something also on youtube and i guess on display .
@DavidShapira-vq4ly
@DavidShapira-vq4ly Ай бұрын
Now i see that d_p is empty and also v_ pis empty
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
⚡️NEWS | UNITED RUSSIA OFFICE AND ATMS BURNED DOWN | COMPLAINING TO PUTIN ABOUT GREF
9:14
Build Anything with Claude Agents, Here’s How
18:35
David Ondrej
Рет қаралды 196 М.
How to Scrape Google Maps & Get Unlimited Leads For FREE!
25:41
Helena Liu
Рет қаралды 59 М.
This Changed My Life... Secrets I Learned From The Rich
16:44
Codie Sanchez
Рет қаралды 70 М.
DRM explained - How Netflix prevents you from downloading videos?
18:17
Mehul - Codedamn
Рет қаралды 241 М.
I Scraped the Entire Steam Catalog, Here’s the Data
11:29
Newbie Indie Game Dev
Рет қаралды 576 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН