Hi Josh,

First of all thanks a lot for the update !!

Yes u were right it was a wrong google id that was used whille generating 
the token

I regenerated the token using the correct login details and i got the 
campaign details

now i am using a function to get the stats information 


   Public Function updateStats(ByVal SearchEngineCampaignObj As 
SearchEngineCampaign, ByVal MarketingTouchPointObj As MarketingTouchPoint) 
As Boolean
            Dim user As AdWordsUser
            user = getUser()

            If user Is Nothing Then
                Return False
            End If

   

            Try
                adGroupServiceObj = 
user.GetService(AdWordsService.v201406.AdGroupService)
            Catch ex As Exception
 
            End Try

            Dim CampaignID As Long

            Dim page As New AdGroupPage
            Dim secsObj As New SearchEngineCampaignStats   
            Dim dateRangeObj As DateRange

            Try
                CampaignID = CLng(ID)
            Catch ex As Exception
                Return False
            End Try

            Dim selector As New Selector
            selector.fields = New String() {"Id", "Name", "Status", 
"Impressions", "Cost", "Ctr", "AveragePosition", "Conversions", "Clicks"} 
', "ConversionRate"}

            Dim orderByName As New OrderBy()
            orderByName.field = "Name"
            orderByName.sortOrder = SortOrder.ASCENDING
            selector.ordering = New OrderBy() {orderByName}

            ' Create the filters.
            Dim predicate As New Predicate
            predicate.field = "CampaignId"
            predicate.operator = PredicateOperator.IN
            predicate.values = New String() {CampaignID.ToString}


            selector.paging = New Paging()
            selector.paging.startIndex = 0
            selector.paging.numberResults = 500

            dateRangeObj = New DateRange()
            dateRangeObj.min =StartDate.ToString("yyyyMMdd")
            dateRangeObj.max = EndDate.ToString("yyyyMMdd")
            selector.dateRange = dateRangeObj

            selector.predicates = New Predicate() {predicate}

            Try
                page = adGroupServiceObj.get(selector)
            Catch ex As Exception
                Return False
            End Try

            If page Is Nothing Then
                Return False
            End If

            Try
                If page.entries Is Nothing Then
                    Return False
                End If
                If page.entries.Length = 0 Then
                    Return False
                End If
            Catch ex As Exception
                Return False
            End Try


            'For Each AdGroupObj As Google.Api.Ads.AdWords.v201406.AdGroup 
In page.entries

          *     i am getting compilation error for these lines *

*                  AdGroupObj.stats.averagePosition*

*                  AdGroupObj.stats.clicks*

*                  AdGroupObj.stats.conversions*

*                  AdGroupObj.stats.cost.microAmount*
*                  AdGroupObj.stats.impressions*
                 *plz let me know* *how can i get this information of 
Adgroup  **stats *
             Next  
        End Function

thanks and regards
Altaf


>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to