Getting all the Floodlight Activity even the floodlightActivities which can't be seen in Report UI?

202 views
Skip to first unread message

Rishav

unread,
Feb 17, 2016, 6:22:24 AM2/17/16
to Google's DoubleClick Campaign Manager API Forum
Hi All,

When we write this query , I am getting all the floodlightActivities for the Advertiser, there are floodlightActivities  which can't be see in the REPORT UI, I guess, I am getting all the floodlightActivities for the entire History of the Advertiser.

 
profile_id = flags.profile_id
  advertiser_id = flags.advertiser_id

  try:
    # Construct the request.
    request = service.floodlightActivities().list(
        profileId=profile_id, advertiserId=advertiser_id)

    while True:
      # Execute request and print response.
      response = request.execute()

      for activity in response['floodlightActivities']:
        print ('Found floodlight activity with ID %s and name "%s".'
               % (activity['id'], activity['name']))

      if response['floodlightActivities'] and response['nextPageToken']:
        request = service.floodlightActivities().list_next(request, response)
      else:
        break
Can someone help me , on this?

I should get only the Visible floodlightActivities seen in report UI.

Jonathon Imperiosi (DCM API Team)

unread,
Feb 17, 2016, 11:15:25 AM2/17/16
to Google's DoubleClick Campaign Manager API Forum
Hi there,

The code you have there is working as expected. Be aware that FloodlightActivities is a trafficking service, which means it pulls data from DCM, not DDM Reporting. You can tell this by examining the OAuth scope listed in the reference docs

If you're only interested in reportable activities, you can query the DimensionValues service, instead. See this guide for more info.

Regards,
- Jonathon Imperiosi, DCM API Team

Rishav

unread,
Feb 18, 2016, 2:57:34 AM2/18/16
to Google's DoubleClick Campaign Manager API Forum
Hi Jonathon,

That was helpful. But when  I was using the previous version of the API, we were able to get the Visible FloodlightActivities.
Now when we have migrated to the 2.4 version the API, we have numerous FloodlightActivities which are not even seen in the UI of DDM Reporting.
Can we get some help to get only the Visible FloodlightActivities which are seen on the UI of DDM Reporting.

Regards 
Rishav 

Rishav

unread,
Feb 18, 2016, 5:30:33 AM2/18/16
to Google's DoubleClick Campaign Manager API Forum
Hi Jonathon,

how can we get all the Active FloodlightActivities for a particular Advertiser from DCM.

Regards'
Rishav  

Jonathon Imperiosi (DCM API Team)

unread,
Feb 18, 2016, 3:03:47 PM2/18/16
to Google's DoubleClick Campaign Manager API Forum
Hi Rishav,

Can you clarify what you mean when you refer to active floodlight activities? If you're referring to the "status" field in the DCM UI, this maps to the hidden field in the FloodlightActivities resource. It's not possible to lookup activities by this field, however. You'd need to iterate through all of the activities for the advertiser and ignore the ones that have this field set to true.

If you're referring to values you see in the reporting UI, then you'll need to use the DimensionValues service, as I mentioned previously. The guide that I linked provides an example, just swap dfa:activity in place of dfa:advertiser.

Regards,
- Jonathon Imperiosi, DCM API Team

Rishav

unread,
Feb 19, 2016, 2:13:32 AM2/19/16
to Google's DoubleClick Campaign Manager API Forum
Hi Jonathon,
That was helpful. By active floodlight activities, I mean the floodlight activities which are seen in DDM Reporting UI. I have already made change in my code as such

     for activity in response['floodlightActivities']:
            print ('Found floodlight activity with ID %s and name "%s".'% (activity['id'], activity['name']))
            if(activity['hidden']==False ):
                           
            
            if (response['floodlightActivities'] and response['nextPageToken']):
                request = service1.floodlightActivities().list_next(request, response)
               
            else:
                  break

Do we have some code where , we can match the FloodlightActivities of DCM to FloodlightActivities  of the DDM reporting UI?

Jonathon Imperiosi (DCM API Team)

unread,
Feb 19, 2016, 4:03:11 PM2/19/16
to Google's DoubleClick Campaign Manager API Forum
Hi Rishav,

As I mentioned, if you're strictly interested in looking up values for reporting, then you'll want to use the DimensionValues service. The FloodlightActivities service returns values as seen in the DCM trafficking UI. Both services will operate on the same set of activities, but the DimensionValues service returns only values that are valid for reporting.

The guide I linked to previously explains how this works and provides a code example. There are additional examples in other languages available in our github repo. Be aware that you'll need to modify the samples to query for dfa;activity to return activity values.

Regards,
- Jonathon Imperiosi, DCM API Team

Reply all
Reply to author
Forward
0 new messages