Posts tagged with adsense

I am trying to work out, in nextjs (reacts) how would I insert a Google Adsense after say the 3 paragraph in the article?

basically we embed the content like this

 <Card.Body dangerouslySetInnerHTML={{__html: data.news.content }}>                    

And somehow I want to after it is loaded to check how many paragraph and insert the ad after say 3 paragraphs.

I am using google-ads-api module in nodejs to connect with Google Ads API.

I am using this code block to get Customer

const customer = client.Customer({     customer_id: 'XXX-XXX-XXXX',     refresh_token: refreshToken, }) 

I have used XXX-XXX-XXXX, XXXXXXXXXX, XXXX-XXX-XXX format for customer_id but still it is returning this error

GoogleAdsFailure {   errors: [     GoogleAdsError {       error_code: [ErrorCode],       message: "Invalid customer ID ''."     }   ],   request_id: 'OcUdfalh_N0U4hTJUd6c6g' } 

I have an Angular SPA web application, register my site to Adsense they approved in 1 day later I inject the codes for showing ads. And other day ads started to shown. 1 hour later I started to see little income. But then income stopped but ads still in my site. Reports on Adsense counts the view but there is no income. Its like this last 3 weeks.

Is there anyone have experience with Adsense and Angular, because I feel like Adsense doesn't work with angular.

I am trying to create a customer client in my Google Ads test account but I receive the following error:

{"errors":[{"error_code":{"not_allowlisted_error":"CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE"},"message":"Customer is not allowlisted for accessing this feature."}],"request_id":"ApWtRj1nJ19MiT-I2Y3EoA"} 

This is my code for creating the customer client (I am using the google-ads-api library)

const client = new GoogleAdsApi({     client_id,     client_secret,     developer_token }); let managerId = "xxx"; let testAccountId = "xxx"; let refreshToken = "xxx"; const customer = client.Customer({     login_customer_id: testAccountId,     customer_id: testAccountId,     refresh_token }); const response = await customer.customers.createCustomerClient({     customer_id: managerId,     customer_client: {         currency_code: "EUR",         descriptive_name: "My customer client",         time_zone: "Europe/London",         resource_name: `customers/${managerId}`     },     email_address: "test@test.io",     access_role: "STANDARD",     validate_only: false,     toJSON: null, }); console.log("response:", response); 

This only thing I can find about it is here: [1]: https://developers.google.com/google-ads/api/reference/rpc/v5/NotAllowlistedErrorEnum.NotAllowlistedError

But it does not clarify anything. I can also not test it on my production Google Ads account since my developer token has to been validated.

Why can't I create a customer client account?