Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query returns campaign data, but report options does not based on TODAY date_constant #486

Open
KirPot05 opened this issue Feb 27, 2024 · 0 comments

Comments

@KirPot05
Copy link

KirPot05 commented Feb 27, 2024

The below query returns all the campaigns perfectly fine.

 SELECT
                campaign.id,
                campaign.name,
                campaign.status,
                campaign.bidding_strategy_type,
                campaign.advertising_channel_type,
                campaign.start_date,
                campaign.end_date,
                campaign_budget.amount_micros,
                metrics.cost_micros,
                metrics.clicks,
                metrics.impressions,
                metrics.conversions

            FROM
                campaign
            WHERE
                segments.date DURING TODAY

While trying to fetch with the methods and config I get empty array returned.

const campaigns = await customer.report({
      entity: "campaign",

      attributes: [
        "campaign.id",
        "campaign.name",
        "campaign.status",
        "campaign.bidding_strategy_type",
        "campaign.advertising_channel_type",
        "campaign.start_date",
        "campaign.end_date",
        "campaign_budget.amount_micros",
      ],

      metrics: [
        "metrics.cost_micros",
        "metrics.clicks",
        "metrics.impressions",
        "metrics.conversions",
      ],

      segments: ["segments.date"],
      date_constant: "TODAY",
    });
@KirPot05 KirPot05 changed the title Query returns campaign data, but report options does not Query returns campaign data, but report options does not based on TODAY date_constant Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant