-2

I am developing a customer portal for a marketing company and they want their customers to be able to track their google analytics data through it. But I am having problems with getting specific campaign id's to appear on a graph.

I've tried using the filter function but I didn't get it to work.

query: {
                ids: '<?php echo $_SESSION['googleID'] ?>',
                metrics: 'ga:goalCompletionsAll',
                dimensions: 'ga:adwordsCampaignID',
                'segment': 'ga:adwordsCampaignID=='<?php echo $adwordsid;?>'',
                'start-date': '30daysAgo',
                'end-date': 'yesterday'

I want to get the goal completions of a specific adwords campaign from the fetched variable $adwordsid we store in the database.

mickmackusa
  • 43,625
  • 12
  • 83
  • 136

1 Answers1

-2
query: {
            ids: '<?php echo $_SESSION['googleID'] ?>',
            metrics: 'ga:goalCompletionsAll',
            dimensions: 'ga:adwordsCampaignID',
            'segment': 'ga:adwordsCampaignID=='<?php echo $adwordsid;?>'',
            'start-date': '30daysAgo',
            'end-date': 'yesterday'
  • Code-only answers are low-value on Stackoverflow. Always, always post answers with the intent to educate and empower the OP and thousands of future researchers. – mickmackusa Jul 01 '19 at 13:04