Hello ,
i am using rest api for creating campaign ,i need set campaign conversion
goals neither the generic nor the custom ,
const createConversionGoals = async (
customerId,
accessToken,
developerToken
) => {
const goals = {
campaign: "customers/3300782374/campaigns/21459121432",
category: "PURCHASE",
origin: "WEBSITE",
resourceName:
"customers/3300782374/campaignConversionGoals/21459121432~PURCHASE~WEBSITE",
};
try {
const response = await axios.post(
https://googleads.googleapis.com/v17/customers/${customerId}/campaignConversionGoals:mutate,
{
operations: [{ update: goals, updateMask: "origin, campaign,
resourceName" }],
},
{
headers: {
Authorization: Bearer ${accessToken},
"developer-token": developerToken,
"login-customer-id": customerId,
"Content-Type": "application/json",
},
}
);
console.log("Response data:", response.data);
// const budgetResourceName = response.data.results[0].resource_name;
return response.data;
} catch (error) {
console.error("Error creating Conversion Goals:", error.response.data);
return error.response.data;
}
};
Please hlep me figure this out
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/7254026b-0fdc-4209-8721-f7108cf2c543n%40googlegroups.com.