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
@aidsi37172 ай бұрын
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?
@3b1agency2 ай бұрын
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.
@aidsi37172 ай бұрын
@@3b1agency Glad to hear, I was thinking it was just mines. Thank you. I'll be staying tuned for new videos from you!
@3b1agency2 ай бұрын
@@aidsi3717 Thanks, I'm glad to hear that!
@GiorgosSidiropoulos-l1h3 ай бұрын
Great video! Can we use this in the MCC environment, or is it strictly for 1 account?
@3b1agency3 ай бұрын
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)}}
@MarkJohnsonPPC2 ай бұрын
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)
@3b1agency2 ай бұрын
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?
@weblinkagency4 ай бұрын
Thanks for the great script and video. One question - how can I convert the spend to dollars from pounds?
@3b1agency4 ай бұрын
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-xt6ny4 ай бұрын
Can we take out data for last 180 days? How can we modify it?
@3b1agency4 ай бұрын
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Ай бұрын
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 .