Файловый менеджер - Редактировать - /home/harasnat/www/horse/wp-content/plugins/google-listings-and-ads/js/build/onboarding.js
Назад
"use strict";(globalThis.webpackChunkgoogle_listings_and_ads=globalThis.webpackChunkgoogle_listings_and_ads||[]).push([[352],{2813:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Ge});var n=a(1609),s=a(6474),l=a(7723),o=a(6476),i=a(7539),r=a(2455),c=a(6473);const d=()=>(0,n.createElement)(i.A,{title:(0,l.__)("Get started with Google for WooCommerce","google-listings-and-ads"),helpButton:(0,n.createElement)(r.A,{eventContext:"setup-mc"}),backHref:(0,o.getNewPath)({},"/google/start"),onBackButtonClick:()=>{(0,c.ce)("gla_setup_mc",{triggered_by:"back-button",action:"leave"})}});var g=a(3741),u=a(8846),m=a(6087),p=a(2434),_=a(7541),h=a(6520),E=a(8859),y=a(7240),f=a(6453);var v=a(5847),A=a(873),b=a(6523),k=a(5622),C=a(5455),w=a(5807),S=a(5640),x=a(7401),I=a(8e3),T=a(7916),G=a(7892),P=a(9370),F=a(3164),N=a(9826),R=a(3704),M=a(8242),q=a(1177),B=a(4790),W=a(1274),j=a(9452);const V=[{trackId:"why-do-i-need-a-wp-account",question:(0,l.__)("Why do I need a WordPress.com account?","google-listings-and-ads"),answer:(0,l.__)("We use a WordPress.com account to connect your site to the WooCommerce and Google servers. It ensures that requests (e.g. product feed, clicks, sales, etc) from your site are securely and correctly attributed to your store. It enables a connection to your self-hosted site, and provides a common authentication interface across disparate server configurations and architectures.","google-listings-and-ads")},{trackId:"why-do-i-need-a-google-mc-account",question:(0,l.__)("Why do I need a Google Merchant Center account?","google-listings-and-ads"),answer:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,l.__)("Google Merchant Center helps you sync your store and product data with Google and makes the information available for both product feed on the Shopping tab and Google Shopping Ads. That means everything about your stores and products is available to shoppers when they search on a Google property.","google-listings-and-ads")),(0,n.createElement)("p",null,(0,m.createInterpolateElement)((0,l.__)("If you create a new Merchant Center account through this application, it will be associated with Google’s Comparison Shopping Service (Google Shopping) by default. You can change the CSS associated with your account at any time. <link>Please find more information here</link>.","google-listings-and-ads"),{link:(0,n.createElement)(q.A,{context:"faqs",linkId:"find-a-partner",href:"https://comparisonshoppingpartners.withgoogle.com/find_a_partner/"})})))}],Y=()=>(0,n.createElement)(j.A,{trackName:"gla_faq",context:"setup-mc-accounts",faqItems:V});var L=a(1378),O=a(1351),D=a(1456);const H=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,m.createInterpolateElement)((0,l.__)("If you are in the European Economic Area or Switzerland, your Merchant Center account must be associated with a Comparison Shopping Service (CSS). Please find more information at <link>Google Merchant Center Help</link> website.","google-listings-and-ads"),{link:(0,n.createElement)(q.A,{context:"setup-mc-accounts",linkId:"comparison-shopping-services",href:"https://support.google.com/merchants/topic/9080307"})})),(0,n.createElement)("p",null,(0,m.createInterpolateElement)((0,l.__)("If you create a new Merchant Center account through this application, it will be associated with Google Shopping, Google’s CSS, by default. You can change the CSS associated with your account at any time. Please find more information about our CSS Partners <link>here</link>.","google-listings-and-ads"),{link:(0,n.createElement)(q.A,{context:"setup-mc-accounts",linkId:"comparison-shopping-partners-find-a-partner",href:"https://comparisonshoppingpartners.withgoogle.com/find_a_partner/"})})),(0,n.createElement)("p",null,(0,l.__)("Once you have set up your Merchant Center account you can use our onboarding tool regardless of which CSS you use.","google-listings-and-ads"))),$=e=>{const{onContinue:t=()=>{}}=e,{jetpack:a}=(0,x.A)(),{google:s,scope:o}=(0,I.A)(),{googleMCAccount:i,isPreconditionReady:r,isLinkedToAds:c,isReady:d}=(0,T.A)(),{hasFinishedResolution:u}=(0,L.A)(),_=(0,D.A)(),{isGoogleAdsReady:h,isLinkedToMerchantCenter:E}=(0,O.A)(),{updateGoogleMCContactInformation:y}=(0,p.j)(),[f,v]=(0,m.useState)(!1),A=!a,b="yes"===a?.active,k=b&&!s,C="yes"===s?.active&&o.gmcRequired&&!i;if(A||k||C)return(0,n.createElement)(g.A,null);const w=!(u&&(E||c)&&h&&d&&_);return(0,n.createElement)(P.A,null,(0,n.createElement)(F.A,{title:(0,l.__)("Set up your accounts","google-listings-and-ads"),description:(0,l.__)("Connect the accounts required to use Google for WooCommerce.","google-listings-and-ads")}),(0,n.createElement)(M.A,{className:"gla-wp-google-accounts-section",title:(0,l.__)("Connect accounts","google-listings-and-ads"),description:(0,l.__)("The following accounts are required to use the Google for WooCommerce plugin.","google-listings-and-ads")},!b&&(0,n.createElement)(B.Ay,{jetpack:a}),(0,n.createElement)(W.A,{disabled:!b})),(0,n.createElement)(N.A,null,(0,n.createElement)(R.A,null,(0,n.createElement)(G.A,{isPrimary:!0,disabled:w,loading:f,text:(0,l.__)("Continue","google-listings-and-ads"),onClick:()=>{v(!0),y().then((()=>t())).catch((()=>v(!1)))}}))),(0,n.createElement)(M.A,{className:"gla-google-mc-disclaimer-section",description:(0,n.createElement)(H,null),disabledLeft:!r},(0,n.createElement)(Y,null)))};var U=a(7343),z=a(8806);const J=()=>(0,n.createElement)("div",{className:"gla-setup-free-listing-hero"},(0,n.createElement)(F.A,{className:"hero-text",title:(0,l.__)("Configure your product listings","google-listings-and-ads"),description:(0,n.createElement)("div",null,(0,n.createElement)("p",{className:"hero-text__subtitle"},(0,l.__)("Your product listings will look something like this.","google-listings-and-ads")),(0,n.createElement)("p",{className:"hero-text__body"},(0,l.__)("Your product details, estimated shipping info and tax details will be displayed across Google.","google-listings-and-ads")))}),(0,n.createElement)("img",{className:"gla-setup-free-listing-hero__image",src:z,alt:(0,l.__)("Google Shopping search results example","google-listings-and-ads")}));function K(e){return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(J,null),(0,n.createElement)(P.A,null,(0,n.createElement)(U.A,{...e}),(0,n.createElement)(N.A,null,(0,n.createElement)(R.A,null,(0,n.createElement)(U.A.SubmitButton,null)))))}var Q=a(8468),X=a(1968),Z=a(8519),ee=a(1042),te=a(8331),ae=a(3323),ne=a(6893),se=a(3666),le=a(6876),oe=a(3905);const ie="complete-ads",re="skip-ads";var ce=a(9457),de=a(6427),ge=a(7677),ue=a(5839),me=a(9057),pe=a(7108);const _e=[{label:(0,l.__)("I already have ads on Google","google-listings-and-ads"),value:"i_already_have_ads_on_google",hasTextInput:!1},{label:(0,l.__)("I don’t have the budget to create ads now","google-listings-and-ads"),value:"i_dont_have_the_budget_to_create_ads_now",hasTextInput:!1},{label:(0,l.__)("I’ve tried Google ads before without success","google-listings-and-ads"),value:"ive_tried_google_ads_before_without_success",hasTextInput:!1},{label:(0,l.__)("I don’t want ads on Google","google-listings-and-ads"),value:"i_dont_want_ads_on_google",hasTextInput:!0},{label:(0,l.__)("I’ll create ads later","google-listings-and-ads"),value:"ill_create_ads_later",hasTextInput:!0},{label:(0,l.__)("Other","google-listings-and-ads"),value:"other",hasTextInput:!0}];var he=a(6960);const Ee=()=>{const{getInputProps:e}=(0,he.h5)();return(0,n.createElement)("div",{className:"gla-skip-paid-ads-survey-modal__survey"},(0,n.createElement)("h3",{className:"gla-skip-paid-ads-survey-modal__survey-title"},(0,l.__)("Why do you want to skip ads?","google-listings-and-ads")),(0,n.createElement)("ul",null,_e.map((t=>{const a=e(t.value);return(0,n.createElement)("li",{key:t.value},(0,n.createElement)(de.CheckboxControl,{label:t.label,value:t.value,...a}),t.hasTextInput&&a.checked&&(0,n.createElement)("div",{className:"gla-skip-paid-ads-survey-modal__text-input"},(0,n.createElement)(de.TextareaControl,{placeholder:(0,l.__)("Tell us why (optional)","google-listings-and-ads"),name:`${t.value}_text`,...e(`${t.value}_text`),rows:2})))}))))},ye=({onRequestClose:e,onSkipCreatePaidAds:t})=>{const a=(0,m.useRef)(),s=_e.reduce(((e,t)=>t.hasTextInput?{...e,[t.value]:!1,[`${t.value}__text`]:""}:{...e,[t.value]:!1}),{});return(0,n.createElement)(he.Ay,{ref:a,initialValues:s},(a=>(0,n.createElement)(ce.A,{className:"gla-skip-paid-ads-survey-modal",title:(0,l.__)("Skip setting up ads?","google-listings-and-ads"),buttons:[(0,n.createElement)(G.A,{key:"cancel",isSecondary:!0,onClick:e},(0,l.__)("Cancel","google-listings-and-ads")),(0,n.createElement)(G.A,{key:"complete-setup",onClick:async()=>{const{values:e,isDirty:n}=a;n&&(0,c.ce)("gla_skip_campaign_creation_survey",{...e,context:"skip-paid-ads-survey-modal"}),t()},isPrimary:!0},(0,l.__)("Send and complete setup","google-listings-and-ads"))],onRequestClose:e},(0,n.createElement)(de.Flex,{gap:6,align:"flex-start",direction:["column","row"],wrap:!0},(0,n.createElement)(de.FlexBlock,null,(0,n.createElement)("div",{className:"gla-skip-paid-ads-survey-modal__benefits"},(0,n.createElement)("h3",{className:"gla-skip-paid-ads-survey-modal__benefits-title"},(0,l.__)("Enable Performance Max to reach more customers","google-listings-and-ads")),(0,n.createElement)("ul",{className:"gla-skip-paid-ads-survey-modal__benefits-list"},(0,n.createElement)("li",null,(0,n.createElement)(de.Flex,{gap:4,align:"flex-start",justify:"flex-start"},(0,n.createElement)(de.FlexItem,null,(0,n.createElement)(ge.A,{icon:ue.A,width:24})),(0,n.createElement)(de.FlexBlock,null,(0,n.createElement)("h4",{className:"gla-skip-paid-ads-survey-modal__benefits-item-title"},(0,l.__)("Drive more sales","google-listings-and-ads")),(0,n.createElement)("p",null,(0,l.__)("Reach new audiences across Google Search, YouTube, and Discover using Google’s AI.","google-listings-and-ads"))))),(0,n.createElement)("li",null,(0,n.createElement)(de.Flex,{gap:4,align:"flex-start",justify:"flex-start"},(0,n.createElement)(de.FlexItem,null,(0,n.createElement)(ge.A,{icon:me.A,width:24})),(0,n.createElement)(de.FlexBlock,null,(0,n.createElement)("h4",{className:"gla-skip-paid-ads-survey-modal__benefits-item-title"},(0,l.__)("Create impactful ads automatically","google-listings-and-ads")),(0,n.createElement)("p",null,(0,l.__)("Your product data is used to generate ads, shown at the right time and place.","google-listings-and-ads")),(0,n.createElement)("p",null,(0,n.createElement)(q.A,{href:"https://support.google.com/google-ads/answer/10724817",context:"skip-paid-ads-survey-modal",linkId:"paid-ads-with-performance-max-campaigns-learn-more"},(0,l.__)("Learn more about Performance Max","google-listings-and-ads")," ",(0,n.createElement)(ge.A,{icon:pe.A,size:16}))))))))),(0,n.createElement)(de.FlexBlock,null,(0,n.createElement)(Ee,null))))))};var fe=a(3921);const ve=({onRequestClose:e,onSkipCreatePaidAds:t})=>(0,fe.A)()?(0,n.createElement)(ye,{onRequestClose:e,onSkipCreatePaidAds:t}):(0,n.createElement)(ce.A,{title:(0,l.__)("Skip setting up ads?","google-listings-and-ads"),buttons:[(0,n.createElement)(G.A,{key:"cancel",isSecondary:!0,onClick:e},(0,l.__)("Cancel","google-listings-and-ads")),(0,n.createElement)(G.A,{key:"complete-setup",onClick:t,isPrimary:!0},(0,l.__)("Complete setup without setting up ads","google-listings-and-ads"))],onRequestClose:e},(0,n.createElement)("p",null,(0,l.__)("Enabling Performance Max is highly recommended to drive more sales and reach new audiences across Google channels like Search, YouTube and Discover.","google-listings-and-ads")),(0,n.createElement)("p",null,(0,l.__)("Performance Max uses the best of Google’s AI to show the most impactful ads for your products at the right time and place. Google will use your product data to create ads for this campaign.","google-listings-and-ads")),(0,n.createElement)("p",null,(0,n.createElement)(q.A,{href:"https://support.google.com/google-ads/answer/10724817",context:"skip-paid-ads-modal",linkId:"paid-ads-with-performance-max-campaigns-learn-more"},(0,l.__)("Learn more about Performance Max.","google-listings-and-ads"))));function Ae({isValidForm:e,onSkipCreatePaidAds:t=Q.noop,loading:a,disabled:s}){const[o,i]=(0,m.useState)(!1),{googleAdsAccount:r}=(0,L.A)(),{billingStatus:d}=(0,ne.A)();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(G.A,{isTertiary:!0,text:(0,l.__)("Skip ads creation","google-listings-and-ads"),loading:a,disabled:s,onClick:()=>{i(!0)}}),o&&(0,n.createElement)(ve,{onRequestClose:()=>{i(!1)},onSkipCreatePaidAds:()=>{i(!1);const a={google_ads_account_status:r?.status,billing_method_status:d?.status||"unknown",campaign_form_validation:e?"valid":"invalid"};(0,c.ce)("gla_onboarding_complete_button_click",a),t()}}))}const be="gla-onboarding-paid-ads",{sessionStorage:ke}=window,Ce={setCampaign({level:e,amount:t}){const a=JSON.stringify({level:e,amount:t});ke.setItem(be,a)},getCampaign(){const e=ke.getItem(be);return null===e?null:JSON.parse(e)}};function we(){const e=(0,m.useRef)(),t=(0,X.A)(),[a,s]=(0,m.useState)(null),{data:o}=(0,v.A)(),[i]=(0,Z.A)(),{billingStatus:r}=(0,ne.A)(),{syncSettings:d}=(0,p.j)(),u=(0,_.A)(c.eB),h=r?.status===oe.CX.APPROVED,E=async(e=Q.noop)=>{try{await d(),await e()}catch(e){return s(null),void(0,le.h)(e,(0,l.__)("Unable to complete your setup.","google-listings-and-ads"))}const a={guide:oe.K4.SUBMISSION_SUCCESS};window.location.href=t+(0,se.hP)(a)},y=async()=>{s(re),await E()},f={...Ce.getCampaign()};return o?(0,n.createElement)(ae.A,{initialCampaign:f,countryCodes:o,onChange:(e,t)=>{Ce.setCampaign(t)},onSubmit:async e=>{const{level:t,dailyBudget:a}=e,n=i.bind(null,a,o);s(ie),(0,c.ce)("gla_onboarding_complete_with_paid_ads_button_click",u({level:t,budget:a,audiences:o.join(",")})),await E(n)}},(0,n.createElement)(ee.A,{headerTitle:(0,l.__)("Create a campaign to advertise your products","google-listings-and-ads"),continueButton:t=>{const{isValidForm:s,values:o}=t,i=a===re||!s||!h;return(0,n.createElement)(G.A,{isPrimary:!0,disabled:i,onClick:()=>{e.current.resolve(o.dailyBudget).then((e=>{null===e?t.handleSubmit():Number.isFinite(e)&&t.setValues({level:"custom",amount:e})}))},loading:a===ie,text:(0,l.__)("Complete setup","google-listings-and-ads")})},skipButton:e=>{const{isValidForm:t}=e;return(0,n.createElement)(Ae,{isValidForm:t,onSkipCreatePaidAds:y,disabled:a===ie,loading:a===re})},context:"setup-mc"}),(0,n.createElement)(te.A,{ref:e,countryCodes:o})):(0,n.createElement)(g.A,null)}const Se={accounts:"1",product_listings:"2",paid_ads:"3"},xe=({savedStep:e})=>{const[t,a]=(0,m.useState)(e),{settings:s,saveSettings:o}=(0,A.A)(),{data:i}=(()=>{const{hasFinishedResolution:e}=(0,y.A)(),{hasFinishedResolution:t,data:a}=(0,E.A)(),{loading:n,data:s}=(0,f.A)({path:`${h.RV}/mc/target_audience/suggestions`});return{loading:!e||!t||n,data:t&&null===a?.location&&null===a?.countries?s:a}})(),{targetAudience:r,getFinalCountries:d}=(0,v.A)(),{hasFinishedResolution:g,data:x}=(0,b.A)(),{hasFinishedResolution:I,data:T}=(0,k.A)(),{saveTargetAudience:G}=(0,p.j)(),{saveShippingRates:P}=(0,C.A)(),{saveShippingTimes:F}=(0,w.A)(),{createNotice:N}=(0,S.A)();(0,_.A)(c.T1,{context:c.GH,step:t}),(0,m.useEffect)((()=>{null===r?.location&&i?.location&&G(i)}),[r,i,G]),(0,m.useEffect)((()=>{null===s?.shipping_rate&&o({...s,shipping_rate:"flat",shipping_time:"flat"})}),[s,o]);const R=e=>{const n=t;(0,c.dQ)("gla_setup_mc",n,e),a(e)},M=e=>{Number(e)<Number(t)&&((0,c.T)("gla_setup_mc",e),a(e))};function q(e,t){this(t).catch((()=>N("error",e)))}const B=g?x:null,W=I?T:null,j=r?.location?r:null,V=s?.shipping_rate?s:null;return(0,n.createElement)(u.Stepper,{className:"gla-setup-stepper",currentStep:t,steps:[{key:Se.accounts,label:(0,l.__)("Set up your accounts","google-listings-and-ads"),content:(0,n.createElement)($,{onContinue:()=>{R(Se.product_listings)}}),onClick:M},{key:Se.product_listings,label:(0,l.__)("Configure product listings","google-listings-and-ads"),content:(0,n.createElement)(K,{targetAudience:j,settings:V,shippingRates:B,shippingTimes:W,resolveFinalCountries:d,onTargetAudienceChange:q.bind(G,(0,l.__)("There was an error saving audience.","google-listings-and-ads")),onSettingsChange:q.bind(o,(0,l.__)("There was an error saving settings.","google-listings-and-ads")),onShippingRatesChange:q.bind(P,(0,l.__)("There was an error saving shipping rates.","google-listings-and-ads")),onShippingTimesChange:q.bind(F,(0,l.__)("There was an error saving shipping times.","google-listings-and-ads")),onContinue:()=>{R(Se.paid_ads)},submitLabel:(0,l.__)("Continue","google-listings-and-ads")}),onClick:M},{key:Se.paid_ads,label:(0,l.__)("Create a campaign","google-listings-and-ads"),content:(0,n.createElement)(we,null),onClick:M}]})};var Ie=a(3027);const Te=()=>{const{hasFinishedResolution:e,data:t}=(0,Ie.A)();if(!e&&!t)return(0,n.createElement)(g.A,null);if(e&&!t)return null;const{status:a,step:s}=t;return"complete"===a?((0,o.getHistory)().replace((0,o.getNewPath)({},"/google/dashboard")),null):(0,n.createElement)(xe,{savedStep:Se[s]})},Ge=()=>((0,s.A)("full-page"),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(d,null),(0,n.createElement)(Te,null)))}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка