why my campaign is attached with all conversion pixel instead of what i have selected.

58 views
Skip to first unread message

Sunil Gupta

unread,
Jun 19, 2022, 4:45:07 PM6/19/22
to Google Ads API and AdWords API Forum
// I am trying to add a campaign with a conversion pixel , but whenever i am calling this api to attach that conversion pixel with my campaign .
My campaign is attached with all other conversion pixel type instead of selecting last one .



Code :


public void syncingConversionWithCampaignV2(ExtConversionPixel xConversionPixel, ExtCampaign xCampaign, GoogleAdsClient googleAdsClient) {
Long customerId = Long.valueOf(xCampaign.getUri().split("/")[1]);
long campaignId = Long.valueOf(xCampaign.getUri().split("/")[3]);
CampaignConversionGoal.Builder campaignConversionGoalBuilderObj = CampaignConversionGoal.newBuilder().setResourceName(
ResourceNames.campaignConversionGoal(customerId, campaignId
, ConversionActionCategoryEnum.ConversionActionCategory.PURCHASE,
ConversionOriginEnum.ConversionOrigin.WEBSITE);

CampaignConversionGoalOperation campaignConversionGoalOp = CampaignConversionGoalOperation.newBuilder().setUpdate(campaignConversionGoalBuilderObj).setUpdateMask((FieldMasks.allSetFieldsOf(campaignConversionGoalBuilderObj.build()))).build();
try (CampaignConversionGoalServiceClient serviceClient = googleAdsClient.getLatestVersion().createCampaignConversionGoalServiceClient()) {
MutateCampaignConversionGoalsResponse response = serviceClient.mutateCampaignConversionGoals("CUSTOMER_ID", of(campaignConversionGoalOp));

log.info("syncConversionWithCampaign response :: " + response.getResults(0).getResourceName());
}
catch(Exception e){
log.info("Error in syncConversionWithCampaign with msg is :: "+e.getMessage());
e.printStackTrace();
}
}

Now, instead of purchase type, I can see all other conversion pixel type selected , but i used purchase while creating campaign.Screenshot 2022-06-20 at 2.13.04 AM.png



Can you pls help me , why this is happening like this?

Thanks !

Google Ads API Forum Advisor

unread,
Jun 20, 2022, 6:12:12 AM6/20/22
to sunil....@gmail.com, adwor...@googlegroups.com
Hi Sunil,

Thank you for raising your concern to my team.

With regards to your concern, it appears that the more appropriate feature that you can use on your use case is the custom goal. To know more information about the custom goal and how to implement it, you can refer to this guide.

If the error persists, please provide the complete request and response logs with request ID and request header generated on your end so that we can further investigate the issue. You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2by2sq:ref
Reply all
Reply to author
Forward
0 new messages