PageSourceSearch

https://www.dashboard.bluewalnut.ai/183.075df409f62b82a7.js

js bluewalnut.ai collected 2026-10-05 11:51:13 UTC 16,110 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkecmai=self.webpackChunkecmai||[]).push([[183],{6183(z,p,o){o.d(p,{AgencyAdSpendAlertSettingsComponent:()=>U});var l=o(2615),h=o(8061),d=o(9417),m=o(2384),u=o(7402),f=o(5807),x=o(6739),e=o(3664),b=o(8834),C=o(3746),c=o(9588),y=o(455),k=o(450),M=o(9213);const g=(n,i)=>i.website_name,v=(n,i)=>i.report_url+i.scope_text,w=(n,i)=>i.report_url+i.platform_label;function F(n,i){1&n&&(e.j41(0,"div",3),e.EFF(1,"Loading..."),e.k0s())}function E(n,i){1&n&&(e.j41(0,"div",4)(1,"mat-icon",11),e.EFF(2,"check_circle"),e.k0s(),e.j41(3,"span"),e.EFF(4,"No open ad spend alerts right now."),e.k0s()())}function P(n,i){if(1&n&&(e.j41(0,"span",20),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.objective_label)}}function O(n,i){if(1&n&&(e.j41(0,"tr")(1,"td",15),e.EFF(2),e.k0s(),e.j41(3,"td",16),e.EFF(4),e.k0s(),e.j41(5,"td",17)(6,"a",19),e.EFF(7),e.k0s(),e.nVh(8,P,2,1,"span",20),e.k0s(),e.j41(9,"td",18),e.EFF(10),e.k0s()()),2&n){const t=i.$implicit;e.R7$(2),e.JRh(t.platform_name),e.R7$(2),e.JRh(t.days_since_last_conversion_text),e.R7$(2),e.Y8G("href",t.report_url,e.B4B),e.R7$(),e.JRh(t.scope_text),e.R7$(),e.vxM(t.objective_label?8:-1),e.R7$(2),e.SpI("\u20ac",t.lost_spend)}}function A(n,i){if(1&n&&(e.j41(0,"p",13)(1,"strong"),e.EFF(2),e.k0s()(),e.j41(3,"table",14)(4,"thead")(5,"tr")(6,"th",15),e.EFF(7,"Platform"),e.k0s(),e.j41(8,"th",16),e.EFF(9,"Days"),e.k0s(),e.j41(10,"th",17),e.EFF(11,"Campaign"),e.k0s(),e.j41(12,"th",18),e.EFF(13,"Lost spend"),e.k0s()()(),e.j41(14,"tbody"),e.Z7z(15,O,11,6,"tr",null,v),e.k0s()()),2&n){const t=i.$implicit;e.R7$(2),e.JRh(t.website_name),e.R7$(13),e.Dyx(t.rows)}}function S(n,i){if(1&n&&(e.j41(0,"p",12),e.EFF(1," A dash (\u2013) in the Days column means no conversion has ever been recorded for that campaign. "),e.k0s(),e.Z7z(2,A,17,1,null,null,g)),2&n){const t=e.XpG();e.R7$(2),e.Dyx(t.incidentsByWebsite)}}function T(n,i){1&n&&(e.j41(0,"div",3),e.EFF(1,"Loading..."),e.k0s())}function D(n,i){1&n&&(e.j41(0,"div",4)(1,"mat-icon",11),e.EFF(2,"check_circle"),e.k0s(),e.j41(3,"span"),e.EFF(4,"No accounts have stopped spending right now."),e.k0s()())}function R(n,i){if(1&n&&(e.j41(0,"tr")(1,"td",15)(2,"a",19),e.EFF(3),e.k0s()(),e.j41(4,"td",23),e.EFF(5),e.k0s(),e.j41(6,"td",24),e.EFF(7),e.k0s(),e.j41(8,"td",25),e.EFF(9),e.k0s()()),2&n){const t=i.$implicit,a=e.XpG(3);e.R7$(2),e.Y8G("href",t.report_url,e.B4B),e.R7$(),e.JRh(t.platform_label),e.R7$(2),e.Lme(" ",a.currencySymbol(t.currency),"",t.baseline_daily_spend,"/day "),e.R7$(2),e.JRh(a.formatDarkSince(t.dark_since)),e.R7$(2),e.JRh(t.days_dark)}}function j(n,i){if(1&n&&(e.j41(0,"p",13)(1,"strong"),e.EFF(2),e.k0s()(),e.j41(3,"table",22)(4,"thead")(5,"tr")(6,"th",15),e.EFF(7,"Platform"),e.k0s(),e.j41(8,"th",23),e.EFF(9,"Was spending"),e.k0s(),e.j41(10,"th",24),e.EFF(11,"Zero since"),e.k0s(),e.j41(12,"th",25),e.EFF(13,"Days dark"),e.k0s()()(),e.j41(14,"tbody"),e.Z7z(15,R,10,6,"tr",null,w),e.k0s()()),2&n){const t=i.$implicit;e.R7$(2),e.JRh(t.website_name),e.R7$(13),e.Dyx(t.rows)}}function W(n,i){if(1&n&&(e.Z7z(0,j,17,1,null,null,g),e.j41(2,"p",21),e.EFF(3," Account-level only for now \u2014 if a platform has more than one ad account, they are combined into one row. "),e.k0s()),2&n){const t=e.XpG();e.Dyx(t.wentDarkByWebsite)}}function B(n,i){1&n&&(e.j41(0,"div",3),e.EFF(1,"Loading..."),e.k0s())}function I(n,i){1&n&&(e.j41(0,"mat-error"),e.EFF(1,"Required."),e.k0s())}function L(n,i){1&n&&(e.j41(0,"mat-error"),e.EFF(1,"Must be at least 1 day."),e.k0s())}function $(n,i){if(1&n){const t=e.RV6();e.j41(0,"form",26),e.bIt("ngSubmit",function(){l.eBV(t);const s=e.XpG();return l.Njj(s.save())}),e.j41(1,"div",27)(2,"mat-slide-toggle",28),e.EFF(3," Enabled "),e.k0s(),e.j41(4,"mat-icon",29),e.EFF(5,"info_outline"),e.k0s()(),e.j41(6,"mat-form-field",30)(7,"mat-label"),e.EFF(8,"Alert after this many days without a conversion"),e.k0s(),e.nrm(9,"input",31),e.nVh(10,I,2,0,"mat-error"),e.nVh(11,L,2,0,"mat-error"),e.k0s(),e.j41(12,"mat-form-field",30)(13,"mat-label"),e.EFF(14,"Send alerts to (comma-separated emails)"),e.k0s(),e.nrm(15,"textarea",32),e.k0s(),e.j41(16,"div",33)(17,"button",34),e.EFF(18),e.k0s()()()}if(2&n){let t,a;const s=e.XpG();e.Y8G("formGroup",s.form),e.R7$(4),e.Y8G("matTooltip",s.enabledTooltip),e.R7$(6),e.vxM(null!=(t=s.form.get("threshold_days"))&&t.hasError("required")?10:-1),e.R7$(),e.vxM(null!=(a=s.form.get("threshold_days"))&&a.hasError("min")?11:-1),e.R7$(6),e.Y8G("disabled",s.form.invali
1d||s.isSaving),e.R7$(),e.SpI(" ",s.isSaving?"Saving...":"Save"," ")}}const G={EUR:"\u20ac",SEK:"kr",DKK:"kr.",NOK:"kr",USD:"$",GBP:"\xa3"};let U=(()=>{class n{fb=(0,l.WQX)(d.ok);websiteService=(0,l.WQX)(m.j);messageService=(0,l.WQX)(u.G);loggerService=(0,l.WQX)(x.g);route=(0,l.WQX)(h.nX);agencyId="";isLoading=!1;isSaving=!1;form;enabledTooltip="When on, this agency's websites are checked daily for ad-spend issues. Alerts are emailed to the recipients below \u2014 with no recipients they still show on this page but nothing is emailed. Turn off to stop ad-spend alerts for this agency.";stoppedSpendingTooltip='"Stopped spending" flags an ad account that was clearly active \u2014 it spent on at least 10 of the 30 days before going quiet \u2014 and has since run at \u20ac0 for 4 or more days in a row. Zero-spend days are measured against our latest confirmed data fetch, so a gap means the account genuinely spent nothing, not that data is missing. Accounts that stay dark for over 30 days are treated as closed or seasonal and drop off the list.';isLoadingIncidents=!1;incidents=[];incidentsByWebsite=[];isLoadingWentDark=!1;wentDarkIncidents=[];wentDarkByWebsite=[];ngOnInit(){this.loggerService.trackEvent("agency_ad_spend_alert_settings","pageLoad"),this.agencyId=this.route.parent?.snapshot.paramMap.get("agencyId")??"",this.form=this.fb.group({enabled:[!0],threshold_days:[3,[d.k0.required,d.k0.min(1)]],recipient_emails:[""]}),this.load(),this.loadIncidents(),this.loadWentDark()}loadIncidents(){this.isLoadingIncidents=!0,this.websiteService.getAdSpendStallIncidents(this.agencyId).subscribe({next:t=>{this.isLoadingIncidents=!1,this.incidents=t,this.incidentsByWebsite=this.groupByWebsite(t)},error:()=>{this.isLoadingIncidents=!1,this.messageService.error("Could not load open ad spend alerts.")}})}groupByWebsite(t){const a=[],s=new Map;for(const r of t){const _=s.get(r.website_identifier);void 0===_?(s.set(r.website_identifier,a.length),a.push({website_name:r.website_name,rows:[r]})):a[_].rows.push(r)}return a}loadWentDark(){this.isLoadingWentDark=!0,this.websiteService.getAdSpendWentDarkIncidents(this.agencyId).subscribe({next:t=>{this.isLoadingWentDark=!1,this.wentDarkIncidents=t,this.wentDarkByWebsite=this.groupWentDarkByWebsite(t)},error:()=>{this.isLoadingWentDark=!1,this.messageService.error("Could not load stopped-spending alerts.")}})}groupWentDarkByWebsite(t){const a=[],s=new Map;for(const r of t){const _=s.get(r.website_name);void 0===_?(s.set(r.website_name,a.length),a.push({website_name:r.website_name,rows:[r]})):a[_].rows.push(r)}return a}currencySymbol(t){return G[(t??"").toUpperCase()]??"\u20ac"}formatDarkSince(t){if(!t||!Number.isFinite(t))return"-";const a=Math.floor(t/1e4),s=Math.floor(t%1e4/100),r=t%100;return a<1970||s<1||s>12||r<1||r>31?"-":`${r} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][s-1]} ${a}`}load(){this.isLoading=!0,this.websiteService.getAdSpendAlertSettings(this.agencyId).subscribe({next:t=>{this.isLoading=!1,this.form.patchValue(t)},error:()=>{this.isLoading=!1,this.messageService.error("Could not load your ad spend alert settings.")}})}save(){this.form.invalid||(this.isSaving=!0,this.websiteService.updateAdSpendAlertSettings(this.form.value,this.agencyId).subscribe({next:t=>{this.isSaving=!1,this.form.patchValue(t),this.messageService.success("Ad spend alert settings saved.")},error:t=>{this.isSaving=!1;const a=t?.error?.message;this.messageService.error("string"==typeof a?a:a?.recipient_emails?.[0]||a?.threshold_days?.[0]||"Could not save your ad spend alert settings.")}}))}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-agency-ad-spend-alert-settings"]],decls:26,vars:4,consts:[[1,"ad-spend-alert-settings"],[1,"ad-spend-alert-settings__intro"],[1,"ad-spend-alert-settings__incidents"],[1,"ad-spend-alert-settings__loading"],[1,"ad-spend-alert-settings__empty","ad-spend-alert-settings__all-clear"],[1,"ad-spend-alert-settings__wentdark"],[1,"ad-spend-alert-settings__heading-row"],["matTooltipPosition","right","tabindex","0","aria-label","How is Stopped spending measured?",1,"ad-spend-alert-settings__help-icon",3,"matTooltip"],[1,"ad-spend-alert-settings__wentdark-intro"],[1,"ad-spend-alert-settings__settings-heading"],[3,"formGroup"],["aria-hidden","true"],[1,"ad-spend-alert-settings__dash-note"],[1,"ad-spend-alert-settings__website-name"],[1,"ad-spend-alert-settings__incidents-table"],[1,"col-platform"],[1,"col-days"],[1,"col-campaign"],[1,"col-lost-spend"],["target","_blank","rel","noopener",3,"href"],[1,"objective-chip"],[1,"ad-spend-alert-settings__wentdark-note"],[1,"ad-spend-alert-settings__wentdark-table"],[1,"col-was-spending"],[1,"col-zero-since"],[1,"col-days-dark"],[3,"ngSubmit","formGroup"],[1,"ad-spend-alert-settings__row"],["color","primary","formControlName","enabled"],["matTooltipPosition","right","tabindex","0","aria-label","What does Enabled do?",1,"ad-spend-alert-settings__help-icon",3,"matTooltip"],["appearance","outline","hideRequiredMarker","true",1,"formField"],["matInput","","type","number","min","1","formControlName","threshold_days"],["matInput","","rows","2","formControlName","recipient_emails","placeholder","[email protected], [email protected]"],[1,"ad-spend-alert-settings__actions"],["mat-flat-button","","color","primary","type","submit",3,"disabled"]],template:function(a,s){1&a&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2,"Ad Spend Alerts"),e.k0s(),e.j41(3,"p",1),e.EFF(4," Get a daily email when a Google or Meta Ads campaign keeps spending money without a new conversion. This applies across all of your agency's websites \u2014 set it once here. "),e.k0s(),e.j41(5,"section",2)(6,"h3"),e.EFF(7,"Currently open"),e.k0s(),e.nVh(8,F,2,0,"div",3)(9,E,5,0,"div",4)(10,S,4,0),e.k0s(),e.j41(11,"section",5)(12,"div",6)(13,"h3"),e.EFF(14,"Stopped spending"),e.k0s(),e.j41(15,"mat-icon",7),e.EFF(16,"info_outline"),e.k0s()(),e.j41(17,"p",8),e.EFF(18," These accounts were spending and have dropped to zero. That is usually a payment or billing problem \u2014 for example an expired card or a paused account \u2014 rather than wasted spend. It is worth checking the billing on each one. "),e.k0s(),e.nVh(19,T,2,0,"div",3)(20,D,5,0,"div",4)(21,W,4,0),e.k0s(),e.j41(22,"h3",9),e.EFF(23,"Settings"),e.k0s(),e.nVh(24,B,2,0,"div",3)(25,$,19,6,"form",10),e.k0s()),2&a&&(e.R7$(8),e.vxM(s.isLoadingIncidents?8:0===s.incidentsByWebsite.length?9:10),e.R7$(7),e.Y8G("matTooltip",s.stoppedSpendingTooltip),e.R7$(4),e.vxM(s.isLoadingWentDark?19:0===s.wentDarkByWebsite.length?20:21),e.R7$(5),e.vxM(s.isLoading?24:25))},dependencies:[f.I,d.qT,d.me,d.Q0,d.BC,d.cb,d.VZ,d.j4,d.JD,b.$z,C.fg,c.rl,c.nJ,c.TL,y.oV,k.sG,M.An],styles:[".ad-spend-alert-settings[_ngcontent-%COMP%]{max-width:880px;padding:24px}.ad-spend-alert-settings[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:20px;font-weight:700;color:var(--darkBlue)}.ad-spend-alert-settings[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0 0 12px;font-size:16px;font-weight:700;color:var(--darkBlue)}.ad-spend-alert-settings__intro[_ngcontent-%COMP%]{color:var(--grayText);margin:0 0 24px;line-height:1.5}.ad-spend-alert-settings__loading[_ngcontent-%COMP%]{color:var(--grayText);padding:16px 0}.ad-spend-alert-settings__empty[_ngcontent-%COMP%]{color:var(--grayText)}.ad-spend-alert-settings__all-clear[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;margin:4px 0 0;padding:8px 14px;border:1px solid var(--successGreen);border-radius:8px;background:color-mix(in srgb,var(--successGreen) 8%,transparent);font-size:13px;max-width:100%}.ad-spend-alert-settings__all-clear[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:var(--successGreen);font-size:18px;height:18px;width:18px;flex:0 0 18px;line-height:18px}.ad-spend-alert-settings__incidents[_ngcontent-%COMP%]{margin-bottom:32px}
1.ad-spend-alert-settings__website-name[_ngcontent-%COMP%]{margin:16px 0 6px}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]{width:640px;max-width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:8px;font-size:13px}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{text-align:left;padding:6px 10px;border-bottom:1px solid var(--grayBorder, #e0e0e0)}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{color:var(--grayText);font-weight:600}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--darkBlue);font-weight:600;text-decoration:none}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   .col-platform[_ngcontent-%COMP%]{width:18%;white-space:nowrap}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   .col-days[_ngcontent-%COMP%]{width:10%;text-align:right}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   .col-campaign[_ngcontent-%COMP%]{width:52%}.ad-spend-alert-settings__incidents-table[_ngcontent-%COMP%]   .col-lost-spend[_ngcontent-%COMP%]{width:20%;text-align:right}.ad-spend-alert-settings__dash-note[_ngcontent-%COMP%]{color:var(--grayText);font-size:12px;margin:0 0 12px}.ad-spend-alert-settings__wentdark[_ngcontent-%COMP%]{margin-bottom:32px}.ad-spend-alert-settings__heading-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:0 0 12px}.ad-spend-alert-settings__heading-row[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0}.ad-spend-alert-settings__wentdark-intro[_ngcontent-%COMP%]{color:var(--grayText);margin:0 0 12px;line-height:1.5}.ad-spend-alert-settings__wentdark-note[_ngcontent-%COMP%]{color:var(--grayText);font-size:12px;margin:8px 0 0}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]{width:640px;max-width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:8px;font-size:13px}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{text-align:left;padding:6px 10px;border-bottom:1px solid var(--grayBorder, #e0e0e0)}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{color:var(--grayText);font-weight:600}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--darkBlue);font-weight:600;text-decoration:none}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   .col-platform[_ngcontent-%COMP%]{width:28%;white-space:nowrap}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   .col-was-spending[_ngcontent-%COMP%], .ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   .col-zero-since[_ngcontent-%COMP%]{width:26%;text-align:right}.ad-spend-alert-settings__wentdark-table[_ngcontent-%COMP%]   .col-days-dark[_ngcontent-%COMP%]{width:20%;text-align:right}.ad-spend-alert-settings__settings-heading[_ngcontent-%COMP%]{margin-top:8px}.ad-spend-alert-settings__row[_ngcontent-%COMP%]{margin-bottom:16px;display:flex;align-items:center;gap:8px}.ad-spend-alert-settings__help-icon[_ngcontent-%COMP%]{color:var(--grayText);font-size:18px;height:18px;width:18px;cursor:help}.ad-spend-alert-settings[_ngcontent-%COMP%]   .formField[_ngcontent-%COMP%]{display:block;width:100%;margin-bottom:8px}.ad-spend-alert-settings__actions[_ngcontent-%COMP%]{margin-top:8px}.objective-chip[_ngcontent-%COMP%]{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:10px;font-size:11px;line-height:16px;white-space:nowrap;background:color-mix(in srgb,var(--grayText) 14%,transparent);color:var(--grayText)}"]})}return n})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.