We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi team,
I tried creating a custom segment via the SDK; but couldn't find a way. Can you help me out here? and point me in the right direction?
I was trying this approach without any success:
const clientID = process.env.CLIENT_ID; const clientSecret = process.env.CLIENT_SECRET; const refreshToken = process.env.REFRESH_TOKEN; const customerID = process.env.CUSTOMER_ID; const developerToken = process.env.DEVELOPER_TOKEN; const { GoogleAdsApi } = require("google-ads-api"); const client = new GoogleAdsApi({ client_id: clientID, client_secret: clientSecret, developer_token: developerToken }); async function createCustomSegment() { const customer = client.Customer({ customer_id: customerID, refresh_token: refreshToken }); const segment = { name: "Custom Segment Nils", type: "INTEREST", status: "ENABLED", description: "A custom segment based on interests", criteria: ["ios developer jobs"] // Replace with your interests }; console.log("customer.segments", customer); const response = await customer.segments.create(segment); console.log(`Created segment with ID ${response.id}`); } createCustomSegment().catch(console.error);
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
Hi team,
I tried creating a custom segment via the SDK; but couldn't find a way.
Can you help me out here? and point me in the right direction?
I was trying this approach without any success:
The text was updated successfully, but these errors were encountered: