Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Paid Ads Campaign Step 1 Account Connection #301

Merged
merged 23 commits into from
Mar 10, 2021

Conversation

ecgan
Copy link
Member

@ecgan ecgan commented Mar 8, 2021

Changes proposed in this Pull Request:

Closes #167 .

This PR provides the Step 1 in Setup Paid Ads Campaign. You will be able to create new Google Ads account or link an existing Google Ads account.

Screenshots:

image

Detailed test instructions:

  1. Open https://gla1.loca.lt/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fsetup-ads
  2. Proceed with connecting Google account and Google Ads account. The end result should resemble the screenshot above.

js/src/components/account-select-control/index.js Outdated Show resolved Hide resolved
js/src/data/reducer.js Show resolved Hide resolved
Comment on lines +1 to +16
.gla-setup-stepper {
.woocommerce-stepper__steps {
align-items: center;
justify-content: center;
height: 64px;
background-color: #fff;
box-shadow: inset 0 -1px 0 #ccc;
margin-bottom: 0;

.woocommerce-stepper__step-divider {
margin-top: 0;
align-self: auto;
max-width: 48px;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are duplicated styling to setup-mc/setup-stepper/index.scss

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm aware of that 😄 👍 which is why I added a comment in js/src/setup-ads/ads-stepper/index.js that we should refactor it some time later after this PR gets merged. I think @tomalec is / was also making changes to the setup stepper and we can de-dupe it later when everything is stable.

@tomalec
Copy link
Member

tomalec commented Mar 9, 2021

I'm not sure whether it's something to report here or in a separate issue, but when I was testing this page with a Google account, linked with MC account, but without any Ads account, I was getting quite an enigmatic result:
image

{"message":"Error retrieving accounts: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https:\/\/developers.google.com\/identity\/sign-in\/web\/devconsole-project."}

There was a toast that disappeared with: There was an error getting your Google Ads accounts.

The problem was solved once I go to https://ads.google.com/intl/pl_pl/getstarted/? and created an Ads account associated with my test user G account. However, if I was a new-coming merchant I doubt I would guess what to do.

@mikkamp
Copy link
Contributor

mikkamp commented Mar 9, 2021

I'm not sure whether it's something to report here or in a separate issue, but when I was testing this page with a Google account, linked with MC account, but without any Ads account, I was getting quite an enigmatic result

That's been tracked here: #291

js/src/setup-ads/index.js Outdated Show resolved Hide resolved
Add Paid Campaign
</Button>
{ __( 'Add Paid Campaign', 'google-listings-and-ads' ) }
</Link>
Copy link
Member

@tomalec tomalec Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it was not introduced here, but the placement of this link seems off from Figma:

Figma:
image

Actual:
image

BTW, "All programs" seem to be just "Programs" now, but this is a good candidate for a separate PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks fine for me, accessed from https://gla1.test/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard (I changed to "Programs", thanks for the heads up):

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, for me it looks different, and according to what I see in .woocommerce-table .components-card__header { /*...*/ grid-template-columns: auto 1fr auto;
, it should look that way
Screenshot from 2021-03-10 01-05-06

Anyway, it does look the same on trunk, so it's not the matter of this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomalec , thanks for sharing your screenshot. That is weird. Here's my screenshot, based on current trunk branch:

image

The thing is, within my "app-table-card" div, I have woocommerce-card but you have components-card. I look into the code in js/src/components/app-table-card/index.js, it should render WooCommerce Card. Do you have any local changes in your machine?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same results as Tomek. 👀

Copy link
Member

@eason9487 eason9487 Mar 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some clues but have no idea how to fix that in the right way. When the WooCommerce Admin is activated in the Plugins page, it would load v1.9.0 of @woocommerce/components. Otherwise, it would load v1.8.3. And you can see they import different <Card> component sources. 😂

v1.9.0

https://github.com/woocommerce/woocommerce-admin/blob/v1.9.0/packages/components/src/table/index.js

import {
	Card,
// ...emit
} from '@wordpress/components';

v1.8.3

https://github.com/woocommerce/woocommerce-admin/blob/v1.8.3/packages/components/src/table/index.js

import Card from '../card';

@ecgan I believe once you activate the WooCommerce Admin plugin, you will see the same results. 😆

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More precisely, the exactly loading version of @woocommerce/components should depend on the dependency of installed versions of the WooCommerce and WooCommerce Admin plugins.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eason9487 , thanks so much, that's awesome troubleshooting! 😃 👍

@ecgan I believe once you activate the WooCommerce Admin plugin, you will see the same results. 😆

I do have WC Admin activated, but it is version 1.8.0 😂

I created an issue to track this: #320

@ecgan ecgan requested review from tomalec and eason9487 March 9, 2021 15:12
@jconroy
Copy link
Member

jconroy commented Mar 10, 2021

Nice @ecgan I was able to run through and connect an existing account 👍

One thing I noticed is I see an error message flash up briefly on the initial load

Screen Capture on 2021-03-10 at 19-03-04

Copy link
Member

@tomalec tomalec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from flashing error, tests and looks good to me.
https://github.com/woocommerce/google-listings-and-ads/pull/301/files#r590264569 seems like a candidate for another PR.

Conflicts:
	js/src/components/stepper/top-bar/index.js
@ecgan ecgan merged commit a1d7404 into trunk Mar 10, 2021
@ecgan ecgan deleted the feature/setup-ads-step-1 branch March 10, 2021 14:10
@ecgan
Copy link
Member Author

ecgan commented Mar 10, 2021

I created a separate issue to track the flashing error here: #318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ads onboarding - create campaign Step 1 ("Onboard Ads User")
5 participants