Google Ads Connector
Documentation
Version: 1
Documentation

Google Ads Connector - Source Code


<?xml version="1.0" encoding="utf-8"?>
<ApiConfig Name="Google Ads"
           Desc="Read / write Google Ads data inside your app (e.g. Campaigns, Ad Groups, Keywords, Spending, Performance); perform many Google Ads operations without coding, just using easy to use high performance API Connector for Google Ads"
           Slug="google-ads-connector"
           Id="83ef9e37-2308-4755-b530-338eda173f99" 
           Logo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAHIFJREFUeF7tnQeYFdX5xkEsqFhig9ixCxpERIOKREFEI1KW3UXFhg3QYCwQ/mqMaIxKFUQQEbtbYKUjuHtBBRVFsQQURI1RNKKwWNDY0PN/3+Gbzdmzc7exe+/M3O99nt+ze885M3PPzPvNnDIzt4FKpVKpVCqVSqVSqVQqlUqlUqlUKpVKpVKpVCqVSqWKlC4esXJrsJ2wtSSrVJknBMDuoCMYAh4Hz4PlYLXA/xeDPHAT6AKayuIqVfwEgzcG3cEUsBaYGrIezALng11ktSpVtAUzbw+uAitBkPFrw0fgZrC7bEalip5g4K5gBQgyeV2wBlwmm1OpoiGYtgmYJCZOBXPBfrJ5lSq8glEPBcvEuKnkE9BBvoZKFT5dMuKdNjDpp5ZpU833IEu+jkoVHl06cnkrmPMLy6zpYhPoIV9LpUq/Box+bR9cPf7lGDWdfAfayddTqdKnooKzG102cvlCx6BhgAG7l3xNlSo9GnjPsqGOMcNEvnxNlSr1umtCSZvLR6746aJgc4aFnvJ1VarUatDYV4svGrEqyJRh4h2wg3xllSo1yn80L6ffqOUm5FcPnyHytVWq+pdZ2WDH8ZOeWXX+8HeDzBhGNoAD5OurVPWrVbOvuOnGsa+aPsND37yymSxfX6WqP5mXGjRfPHXEl+dF5+rh8ys4SaqhUtWPNixo8EjeI0+Z7GHvBZkw7Dwn1VCp6l6liabtPytuZ4aOW2IieAXxuUCqo1LVnb4oObrh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KhN2DG9s4wxyZ3Am4JwB27E1flQTy9Co7MtwjoAHin2AppJdpVCW8yW8eZHL8bZyTgZW+3ugrG98DiGzPl5Q4a89v8Eg4nYYlLz6cETJ++ytxBHSeUsNBzk4+cY+F/dNQ8lOu/BdWA9+x90kqVpCefap2FcM7OirYiAcXF4JGQhs6gyW5ApC3mLgB0hZJ1+lirVgdvtpSTYLvfubbCGNAxN+GfI3yVKp4i2YnU1C2/zsf/CFeJeAy0ERsPPZ5s6cu1VVKhjefWNLZZwni6lUmSMYn1cM/wGhIDjCk/ReMZUq9kIA8Gk8vnibHXI+G0L4ABcnz/RthSqVLwQER7e2k48qlUqlUqlUKpVKpVKpVCqVSqVSqVQqlUqlUqlUKpUqLmrQ4P8B0FYtKvYuWfMAAAAASUVORK5CYII="
           Version="1"
           EngineVersion="18"
>
	<VersionHistory>
		<Change Ver="1" Date="2025-02-12">Initial version</Change>
	</VersionHistory>

	<ServiceUrls>
		<ServiceUrl Name="GoogleAds Api URL" Url="https://googleads.googleapis.com/[$ApiVersion$]" />
	</ServiceUrls>
	<Auths>
		<Auth Name="OAuth"
			Label="User Account" 
			Desc="User accounts represent a developer, administrator, or any other person who interacts with Google APIs and services. User accounts are managed as Google Accounts, either with Google Workspace or Cloud Identity. They can also be user accounts that are managed by a third-party identity provider and federated with Workforce Identity Federation."          
			HelpLink="https://cloud.google.com/docs/authentication#user-accounts"
			Type="OAuth" 
			ConnStr="Provider=GoogleAdWords;ScopeSeparator={space};RetryMode=[$RetryMode$];RetryStatusCodeList=[$RetryStatusCodeList$]"
			TestEndPoint="get_linked_customers"
			>
			<Params>
				<Param Name="UseCustomApp" Value="True" Required="True" Hidden="False" Desc="Use your own app credentials or inbuilt app provided by ZappySys for ease of use. If you choose UseCustomApp=true then make sure to obtain your own ClientId and Secret using steps provided (Click [Steps to Configure] link found next to Authentication Type dropdown)" />
				<Param Name="ClientId" VisibleIf="UseCustomApp" RequiredIf="UseCustomApp"/>
				<Param Name="ClientSecret" Secret="True" VisibleIf="UseCustomApp" RequiredIf="UseCustomApp" />
				<Param Name="Scope" Value="https://www.googleapis.com/auth/adwords" />
				<Param Name="CustomerId" Template="CustomerIdParam" />
				<Param Name="DeveloperToken" Template="DeveloperTokenParam" />
				<Param Name="LoginCustomerId" Template="LoginCustomerIdParam" />
				<Param Name="LinkedCustomerId" Template="LinkedCustomerIdParam" />				
				<Param Name="ApiVersion" Template="ApiVersionParam" />		

				<Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
				<Param Name="RetryStatusCodeList" Value="429" Hidden="True" />
				<Param Name="RetryCountMax" Value="5" Hidden="True" />
				<Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />   
				<Param Name="ReturnUrl" Label="Redirect URL (Only for Web App)" Options=";https://zappysys.com/oauth/" VisibleIf="UseCustomApp" Desc="Only specifiy this if you have created Credential as Web Application rather than Desktop. In Desktop App you dont have to supply Return URL (its always localhost). When you keep this blank it uses default value http://localhost:[some_random_port_each_time] for redirect_url)"  />
			</Params>			
			<Notes>
				<![CDATA[
<p>
    Follow these steps on how to create Client Credentials (User Account principle) to authenticate and access Google Ads API in SSIS package or ODBC data source:    
</p>

<div class="alert alert-warning">
    <strong>WARNING</strong>: 
        
    If you are planning to automate processes, we recommend that you use a <em>Service Account</em> authentication method.    
    In case, you still need to use <em>User Account</em>, then make sure you use a system/generic account (e.g. <code>automation@my-company.com</code>).
    When you use a personal account which is tied to a specific employee profile and that employee leaves the company, 
    the token may become invalid and any automated processes using that token will start to fail.
</div>    

<h3>Manager Account Setup - Obtain Developer Token</h3>
<p>
    To access Google Ads API (your data or someone else data) you must perform the following steps (high level). Detailed steps listed in the next sections. 
</p>

<ol>
	 <li>Create a Google Ads Manager account (formally known as MCC).</li>
     <li>Apply for Production data access (Upgrade Developer Token access Level to Basic).</li>
	 <li>Link manager account with Google Ads Account.</li>
	 <li>Create a new Project and obtain Client Id and Client Secret</li>
</ol>	 
 
<h4>Step-1: Create a Google Ads Manager account (formally known as MCC)</h4>
<p>
Very first step to access Google Ads API for your own account or someone else account, you will need something called Google Manager Account (formally known as MCC). It will look like a Normal Google Ads Account with some difference so dont get confused if you see similar interface as Ads account.
<br />
<a href="https://support.google.com/google-ads/answer/7459399?hl=en" target="_blank">Click here</a> to see detailed instructions on how to create a <b>manager account</b>. Once you created a manager account, you can login or switch between Ads account and Manager account like below. You can identify manager account using "Manager" word next to the account id when you click Profile dropdown. 

<img src="https://cdn.zappysys.com/api/Images/authentication/google/login-as-google-ads-manager-account.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Login as Google Ads Account Manager (formally known as MCC)"
	 title="Login as Google Ads Account Manager (formally known as MCC)"
	 width="484"
	 height="586" />

</p>


<h4>Step-2: Obtain Developer Token</h4>
<p>
Once you have created and logged in to your Google Ads Manager Account (formally known as MCC) we are ready for the next step which is obtain Developer Token. To access Google Ads API you need to pass developer token in each API call. By default Developer Token is only allowed to access Sandbox (Test) account. If you like to access Production data (Live Ads Account) then you must apply for <strong>Basic Access</strong> by clicking link under Access Level (See next section for information).
<br />
Here is how to can obtain your Developer Token.

<ul>
<li>Log in as Manager account (Or change Top-Right Profile > Choose Manager account ID</li>
<li>Click on <strong>Admin</strong> icon</li>
<li>Click on <strong>API Center</strong> (This option will be missing if you are logged in to Regular Ads account as Client and not using Manager Account (MMC)</li>
<li>Expand Access Level, Click Apply for <strong>Basic Access</strong> if it says "Test". By default Developer Token is created with Test Account access only. To access Production Ads account you must apply for higher access level. Must be Basic or Standard (not Test). After click the link you will see form with few questions, please fill out that and submit the form. Apploval process may take 3-5 days (or longer in some cases if you did not provide enough information).</li>
<li>If your token is already approved for the basic access then copy the token and paste on the Google Ads Connector - Connection UI (For Developer Token property)</li>
</ul>

<a href="https://developers.google.com/google-ads/api/docs/get-started/dev-token" target="_blank">Click here</a> to see detailed instructions on obtaining a <b>developer token</b>
<br />

<img src="https://cdn.zappysys.com/api/Images/authentication/google/google-ads-apply-for-developer-token.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Developer Token for Google Ads API Access in API Center (Visible when logged in as Manager Account)"
	 title="Developer Token for Google Ads API Access in API Center (Visible when logged in as Manager Account)"
	 width="755"
	 height="695" />

</p>
<h3>Link Manager Account to Google Ads Account</h3>
After you have manager account ready, next step is to link manager account with Google Ads Account. You have to send invitation from Manager account to access Google Ads account (it can be your own account or someone else). Here is how to send invite to link Google Ads account.
<ul>
<li>Log in as Manager account (Or change Top-Right Profile > Choose Manager account ID</li>
<li>Click on <strong>Accounts</strong> icon &gt; <strong>Sub-account settings</strong> &gt; <strong>Send Link Request</strong></li>
<li>Click on Add Sign (+) and select <strong>+ Link existing account</strong> option</li>
<li>When prompted enter Account Id(s) you like to link with this Manager Account.
<img src="https://cdn.zappysys.com/api/Images/authentication/google/google-manager-account-send-invite-access-ads.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Link Google Manager Account with Ads Account"
	 title="Link Google Manager Account with Ads Account"
	 width="789"
	 height="403" />
</li>
<li>Click <strong>Send Request</strong>. You can find Ad Account Id usually at the Top-Right corner after you login to the Google Ads account.

<img src="https://cdn.zappysys.com/api/Images/authentication/google/send-invite-add-google-manager.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Send Invitation to link Google Manager Account with Ads Account"
	 title="Send Invitation to link Google Manager Account with Ads Account"
	 width="706"
	 height="505" />
	 
</li>
<li>Now ask Google Ads Account owner to check email. Click Accept Invitation link in the email (If prompted login as Google Ads Account owner).<br />
-OR- <br />
Another way to see Invitation, Login to Google Ads account (Or Switch from the Top-Right corner by clicking Profile icon). Go to <strong>Admin</strong> icon &gt; <strong>Access and security</strong> &gt; <strong>Managers</strong> Tab. Find the pending invitation and click <strong>ACCEPT</strong>.

<img src="https://cdn.zappysys.com/api/Images/authentication/google/accept-google-manager-link-invite-for-ads-account.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Accept Manager account to Google Ads Account link invitation"
	 title="Accept Manager account to Google Ads Account link invitation"
	 width="1236"
	 height="468" />
	 
</li>

</li>
<li>That's it. Now your Manager account is linked to the Google Ads account</li>
</ul>

<h3>Obtain ClientId and ClientSecret</h3>

<h4>Step-1: Create project</h4>
<p>
    This step is optional, if you already have a project in Google Cloud and can use it.
    However, if you don't, proceed with these simple steps to create one:
</p>
<ol>
     <li>
          <p>
             First of all, go to <a target="_blank" href="https://console.developers.google.com/">Google API Console</a>.
          </p>
     </li>
	<li>
          <p>
             Then click <strong>Select a project</strong> button and then click <strong>NEW PROJECT</strong> button:
          </p>
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/start-creating-new-project-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Start creating a new project in Google Cloud"
		     title="Starting creating a new project in Google Cloud"
		     width="1000"
		     height="340" />
	</li>
	<li>
          <p>
             Name your project and click <strong>CREATE</strong> button:
          </p>
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/create-new-project-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Create a new project in Google Cloud"
		     title="Creating a new project in Google Cloud"
		     width="680"
		     height="360" />
	</li>
	<li>
          <p>
             Wait until the project is created:
          </p>          
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/wait-until-project-is-created-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Wait until project is created in Google Cloud"
		     title="Waiting until project is created in Google Cloud"
		     width="640"
		     height="390" />
	</li>
     <li>
        Done! Let's proceed to the next step.
     </li>
</ol>

<h4>Step-2: Enable Google Ads API</h4>
<p>
    In this step we will enable Google Ads API:
</p>
<ol>
	<li>
          <p>
             Select your project on the top bar:
          </p>          
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/select-project-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Select project in Google Cloud"
		     title="Selecting project in Google Cloud"
		     width="1000"
		     height="400" />
	</li>
     <li>
          <p>
              Then click the <strong>"hamburger"</strong> icon on the top left and access 
              <a target="_blank" href="https://console.cloud.google.com/apis/dashboard">APIs & Services</a>:
          </p>
          <img src="https://cdn.zappysys.com/api/Images/authentication/google/access-apis-and-services-in-google-cloud.png"
               loading="lazy"
               decoding="async"
               class="img-thumbnail block"
               alt="Access APIs and services in Google Cloud"
               title="Accessing APIs and services in Google Cloud"
               width="990"
               height="440" />
    </li>
    <li>
        <p>
            Now let's enable several APIs by clicking <strong>ENABLE APIS AND SERVICES</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/enable-api-for-project-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Enable API for project in Google Cloud"
             title="Enabling API for project in Google Cloud"
             width="800"
             height="300" />
    </li>
    <li>
        <p>
            In the search bar search for <code>Ads</code> and then locate and select <strong>Google Ads API</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/search-for-api-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Search for API in Google Cloud"
             title="Searching for API in Google Cloud"
             width="1000"
             height="390" />
    </li>
    <li>
        <p>
            Enable <strong>Google Ads API</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/enable-google-ads-api.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Enable Google Ads API"
             title="Enabling Google Ads API"
             width="620"
             height="350" />
    </li>
    <li>
        Done! Let's proceed to the next step.
    </li>    
</ol>



<h4>Step-3: Create OAuth application</h4>
<ol>
    <li>
        <p>
            First of all, click the <strong>"hamburger"</strong> icon on the top left and then hit <strong>VIEW ALL PRODUCTS</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/view-all-products-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="View all products in Google Cloud"
             title="Viewing all products in Google Cloud"
             width="990"
             height="700" />
    </li>
    <li>
        <p>
            Then access 
            <a target="_blank" href="https://console.cloud.google.com/auth">Google Auth Platform</a>
            to start creating an OAuth application:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/open-google-auth-platform-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Open Google Auth Platform in Google Cloud"
             title="Opening Google Auth Platform in Google Cloud"
             width="1000"
             height="430" />
    </li>
    <li>
        <p>
            Start by pressing <strong>GET STARTED</strong> button:
        </p>        
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/start-creating-app-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Start creating an app in Google Cloud"
             title="Starting creating an app in Google Cloud"
             width="1000"
             height="340" />
    </li>    
    <li>
        <p>
            Next, continue by filling in <strong>App name</strong> and <strong>User support email</strong> fields:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/fill-app-info-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Fill app info in Google Cloud"
             title="Filling app info in Google Cloud"
             width="850"
             height="440" />
    </li>
    <li>
        <p>
            Choose <strong>Internal</strong> option, if it's enabled, otherwise select <strong>External</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/choose-app-audience-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Choose app audience in Google Cloud"
             title="Choosing app audience in Google Cloud"
             width="850"
             height="590" />
    </li>
    <li>
        <p>
            <em>Optional step if you used <code>Internal</code> option in the previous step</em>. 
            Nevertheless, if you had to use <code>External</code> option, then click <strong>ADD USERS</strong> to add a user:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/add-test-user-in-google-cloud-app.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Add test user in Google Cloud app"
             title="Adding test user in Google Cloud app"
             width="1000"
             height="990" />
    </li>
    <li>
        <p>
            Then add your contact <strong>Email address</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/enter-app-contact-info-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Enter app contact info in Google Cloud"
             title="Entering app contact info in Google Cloud"
             width="850"
             height="510" />
    </li>
    <li>
        <p>
            Finally, check the checkbox and click <strong>CREATE</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/create-app-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Create app in Google Cloud"
             title="Creating app in Google Cloud"
             width="850"
             height="580" />
    </li>
    <li>
        Done! Let's create Client Credentials in the next step.
    </li>
</ol>



<h4>Step-4: Create Client Credentials</h4>
<ol>
    <li>        
        <p>
            In 
            <a target="_blank" href="https://console.cloud.google.com/auth">Google Auth Platform</a>, 
            select <strong>Clients</strong> menu item and click <strong>CREATE CLIENT</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/start-creating-app-client-in-google-cloud.png"
	       loading="lazy"
	       decoding="async"
	       class="img-thumbnail block"
	       alt="Start creating app client in Google Cloud"
	       title="Starting creating app client in Google Cloud"
	       width="1000"
	       height="340" />
    </li>
    <li>
        <p>
            Choose <code>Desktop app</code> as <strong>Application type</strong> and name your credentials:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/create-oauth-app-client-in-google-cloud.png"
	       loading="lazy"
	       decoding="async"
	       class="img-thumbnail block"
	       alt="Create OAuth app client in Google Cloud"
	       title="Creating OAuth app client in Google Cloud"
	       width="1000"
	       height="500" />
    </li>
    <li>
        <p>
            Continue by opening the created credentials:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/view-app-client-credentials-in-google-cloud.png"
	       loading="lazy"
	       decoding="async"
	       class="img-thumbnail block"
	       alt="View app client credentials in Google Cloud"
	       title="Viewing app client credentials in Google Cloud"
	       width="1000"
	       height="370" />
    </li>
    <li>
        <p>
            Finally, copy <strong>Client ID</strong> and <strong>Client secret</strong> for the later step:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/user-account/use-client-id-and-secret-to-read-google-rest-api-data.png"
	       loading="lazy"
	       decoding="async"
	       class="img-thumbnail block"
	       alt="Use client ID and secret to read Google REST API data"
	       title="Using client ID and secret to read Google REST API data"
	       width="770"
	       height="360" />
    </li>
    <li>  
        Done! We have all the data needed for authentication, let's proceed to the last step!
    </li>    
</ol>

<h4>Step-5: Configure connection</h4>
<ol>
    <li>
        <p>
            Now go to SSIS package or ODBC data source and use previously copied values in <strong>User Account</strong> authentication configuration:
        </p>
	   <ul>
            <li>In the <strong>ClientId</strong> field paste the <strong>Client ID</strong> value.</li>
            <li>In the <strong>ClientSecret</strong> field paste the <strong>Client secret</strong> value.</li>            
			<li>In the <strong>DeveloperToken</strong> field paste the <strong>Developer Token</strong> value.</li>
        </ul>
    </li>
    <li>
        <p>
            Press <strong>Generate Token</strong> button to generate Access and Refresh Tokens.
        </p>
    </li>
    <li>
        <p>
            Finally, click <strong>Test Connection</strong> to confirm the connection is working.
        </p>
    </li>
    <li>
        Done! Now you are ready to use Google Ads Connector!
    </li>        
</ol>
        ]]>
			</Notes>

		</Auth>

		<Auth Name="ServiceAccount" 
			Label="Service Account" 
			Desc="Service accounts are accounts that do not represent a human user. They provide a way to manage authentication and authorization when a human is not directly involved, such as when an application needs to access Google Cloud resources. Service accounts are managed by IAM."
			HelpLink="https://cloud.google.com/docs/authentication#service-accounts"
			Type="OAuth" 
			ConnStr="Provider=GoogleAdWords;UseCustomApp=True;UseClientCertificate=True;CertificateStorageType=PfxFile;CertificatePath=[$PrivateKeyPath$];GrantType=ClientCredentials;RetryMode=RetryWhenStatusCodeMatch;RetryStatusCodeList=403"
			TestEndPoint="get_linked_customers"
			>
			<Params>
				<Param Name="ClientId" Label="Service Account Email" Desc="This is service account email ID (e.g. some_name@my_project.iam.gserviceaccount.com)" Required="True" />
				<Param Name="PrivateKeyPath" Editor="FileOpen" Label="Service Account Private Key Path (i.e. *.json OR *.p12)" Desc="File path for JSON Key or p12 file (i.e. Private Key file for service account). Keep this key file secure" Required="True" />
				<Param Name="Scope" Value="https://www.googleapis.com/auth/adwords" />
				<Param Name="CustomerId" Template="CustomerIdParam" />
				<Param Name="DeveloperToken" Template="DeveloperTokenParam" />
				<Param Name="LoginCustomerId" Template="LoginCustomerIdParam" />
				<Param Name="LinkedCustomerId" Template="LinkedCustomerIdParam" />				
				<Param Name="ApiVersion" Template="ApiVersionParam" />	

				<Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
				<Param Name="RetryStatusCodeList" Value="429" Hidden="True" />
				<Param Name="RetryCountMax" Value="5" Hidden="True" />
				<Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />   
				<Param Name="ImpersonateAs" Type="Property" Key="ExtraAttributesForTokenRequest" Hidden="False" ValueTemplate="user={$value$}" Label="Impersonate As (Google account email address)" />
			</Params>

			<Notes>				                    
				<![CDATA[
<p>
    To access Google Ads API (your data or someone else data) you must perform the following steps (high level). Detailed steps listed in the next sections. 
</p>

<ol>
	 <li>Create a Manager account.</li>
     <li>Apply for Production data access (Upgrade Developer Token access Level to Basic).</li>
	 <li>Link manager account with Google Ads Account.</li>
	 <li>Inside Manager account apply for Basic API Access level so you can use Developer Token to access Live data (Production Ads account). Without Basic access level Developer Token can be only used for Test / Sandbox Ads account.</li>
	 <li>Create a new Project and obtain Client Id and Client Secret</li>
</ol>

<h3>Manager Account Setup - Obtain Developer Token</h3>
<p>
    To access Google Ads API (your data or someone else data) you must perform the following steps (high level). Detailed steps listed in the next sections. 
</p>

<ol>
	 <li>Create a Google Ads Manager account (formally known as MCC).</li>
     <li>Apply for Production data access (Upgrade Developer Token access Level to Basic).</li>
	 <li>Link manager account with Google Ads Account.</li>
	 <li>Create a new Project and obtain Service Account details</li>
</ol>	 
 
<h4>Step-1: Create a Google Ads Manager account (formally known as MCC)</h4>
<p>
Very first step to access Google Ads API for your own account or someone else account, you will need something called Google Manager Account (formally known as MCC). It will look like a Normal Google Ads Account with some difference so dont get confused if you see similar interface as Ads account.
<br />
<a href="https://support.google.com/google-ads/answer/7459399?hl=en" target="_blank">Click here</a> to see detailed instructions on how to create a <b>manager account</b>. Once you created a manager account, you can login or switch between Ads account and Manager account like below. You can identify manager account using "Manager" word next to the account id when you click Profile dropdown. 

<img src="https://cdn.zappysys.com/api/Images/authentication/google/login-as-google-ads-manager-account.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Login as Google Ads Account Manager (formally known as MCC)"
	 title="Login as Google Ads Account Manager (formally known as MCC)"
	 width="484"
	 height="586" />

</p>


<h4>Step-2: Obtain Developer Token</h4>
<p>
Once you have created and logged in to your Google Ads Manager Account (formally known as MCC) we are ready for the next step which is obtain Developer Token. To access Google Ads API you need to pass developer token in each API call. By default Developer Token is only allowed to access Sandbox (Test) account. If you like to access Production data (Live Ads Account) then you must apply for <strong>Basic Access</strong> by clicking link under Access Level (See next section for information).
<br />
Here is how to can obtain your Developer Token.

<ul>
<li>Log in as Manager account (Or change Top-Right Profile > Choose Manager account ID</li>
<li>Click on <strong>Admin</strong> icon</li>
<li>Click on <strong>API Center</strong> (This option will be missing if you are logged in to Regular Ads account as Client and not using Manager Account (MMC)</li>
<li>Expand Access Level, Click Apply for <strong>Basic Access</strong> if it says "Test". By default Developer Token is created with Test Account access only. To access Production Ads account you must apply for higher access level. Must be Basic or Standard (not Test). After click the link you will see form with few questions, please fill out that and submit the form. Apploval process may take 3-5 days (or longer in some cases if you did not provide enough information).</li>
<li>If your token is already approved for the basic access then copy the token and paste on the Google Ads Connector - Connection UI (For Developer Token property)</li>
</ul>

<a href="https://developers.google.com/google-ads/api/docs/get-started/dev-token" target="_blank">Click here</a> to see detailed instructions on obtaining a <b>developer token</b>
<br />

<img src="https://cdn.zappysys.com/api/Images/authentication/google/google-ads-apply-for-developer-token.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Developer Token for Google Ads API Access in API Center (Visible when logged in as Manager Account)"
	 title="Developer Token for Google Ads API Access in API Center (Visible when logged in as Manager Account)"
	 width="755"
	 height="695" />

</p>
<h3>Link Manager Account to Google Ads Account</h3>
After you have manager account ready, next step is to link manager account with Google Ads Account. You have to send invitation from Manager account to access Google Ads account (it can be your own account or someone else). Here is how to send invite to link Google Ads account.
<ul>
<li>Log in as Manager account (Or change Top-Right Profile > Choose Manager account ID</li>
<li>Click on <strong>Accounts</strong> icon &gt; <strong>Sub-account settings</strong> &gt; <strong>Send Link Request</strong></li>
<li>Click on Add Sign (+) and select <strong>+ Link existing account</strong> option</li>
<li>When prompted enter Account Id(s) you like to link with this Manager Account.
<img src="https://cdn.zappysys.com/api/Images/authentication/google/google-manager-account-send-invite-access-ads.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Link Google Manager Account with Ads Account"
	 title="Link Google Manager Account with Ads Account"
	 width="789"
	 height="403" />
</li>
<li>Click <strong>Send Request</strong>. You can find Ad Account Id usually at the Top-Right corner after you login to the Google Ads account.

<img src="https://cdn.zappysys.com/api/Images/authentication/google/send-invite-add-google-manager.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Send Invitation to link Google Manager Account with Ads Account"
	 title="Send Invitation to link Google Manager Account with Ads Account"
	 width="706"
	 height="505" />
	 
</li>
<li>Now ask Google Ads Account owner to check email. Click Accept Invitation link in the email (If prompted login as Google Ads Account owner).<br />
-OR- <br />
Another way to see Invitation, Login to Google Ads account (Or Switch from the Top-Right corner by clicking Profile icon). Go to <strong>Admin</strong> icon &gt; <strong>Access and security</strong> &gt; <strong>Managers</strong> Tab. Find the pending invitation and click <strong>ACCEPT</strong>.

<img src="https://cdn.zappysys.com/api/Images/authentication/google/accept-google-manager-link-invite-for-ads-account.png"
	 loading="lazy"
	 decoding="async"
	 class="img-thumbnail block"
	 alt="Accept Manager account to Google Ads Account link invitation"
	 title="Accept Manager account to Google Ads Account link invitation"
	 width="1236"
	 height="468" />
	 
</li>

</li>
<li>That's it. Now your Manager account is linked to the Google Ads account</li>
</ul>

<h3>Obtain ClientId and ClientSecret</h3>

<h4>Step-1: Create project</h4>
<p>
    This step is optional, if you already have a project in Google Cloud and can use it.
    However, if you don't, proceed with these simple steps to create one:
</p>
<ol>
     <li>
          <p>
             First of all, go to <a target="_blank" href="https://console.developers.google.com/">Google API Console</a>.
          </p>
     </li>
	<li>
          <p>
             Then click <strong>Select a project</strong> button and then click <strong>NEW PROJECT</strong> button:
          </p>
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/start-creating-new-project-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Start creating a new project in Google Cloud"
		     title="Starting creating a new project in Google Cloud"
		     width="1000"
		     height="340" />
	</li>
	<li>
          <p>
             Name your project and click <strong>CREATE</strong> button:
          </p>
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/create-new-project-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Create a new project in Google Cloud"
		     title="Creating a new project in Google Cloud"
		     width="680"
		     height="360" />
	</li>
	<li>
          <p>
             Wait until the project is created:
          </p>          
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/wait-until-project-is-created-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Wait until project is created in Google Cloud"
		     title="Waiting until project is created in Google Cloud"
		     width="640"
		     height="390" />
	</li>
     <li>
        Done! Let's proceed to the next step.
     </li>
</ol>

<h4>Step-2: Enable Google Ads API</h4>
<p>
    In this step we will enable Google Ads API:
</p>
<ol>
	<li>
          <p>
             Select your project on the top bar:
          </p>          
		<img src="https://cdn.zappysys.com/api/Images/authentication/google/select-project-in-google-cloud.png"
		     loading="lazy"
		     decoding="async"
		     class="img-thumbnail block"
		     alt="Select project in Google Cloud"
		     title="Selecting project in Google Cloud"
		     width="1000"
		     height="400" />
	</li>
     <li>
          <p>
              Then click the <strong>"hamburger"</strong> icon on the top left and access 
              <a target="_blank" href="https://console.cloud.google.com/apis/dashboard">APIs & Services</a>:
          </p>
          <img src="https://cdn.zappysys.com/api/Images/authentication/google/access-apis-and-services-in-google-cloud.png"
               loading="lazy"
               decoding="async"
               class="img-thumbnail block"
               alt="Access APIs and services in Google Cloud"
               title="Accessing APIs and services in Google Cloud"
               width="990"
               height="440" />
    </li>
    <li>
        <p>
            Now let's enable several APIs by clicking <strong>ENABLE APIS AND SERVICES</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/enable-api-for-project-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Enable API for project in Google Cloud"
             title="Enabling API for project in Google Cloud"
             width="800"
             height="300" />
    </li>
    <li>
        <p>
            In the search bar search for <code>ads</code> and then locate and select <strong>Google Ads API</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/search-for-api-in-google-cloud.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Search for API in Google Cloud"
             title="Searching for API in Google Cloud"
             width="1000"
             height="390" />
    </li>
    <li>
        <p>
            Enable <strong>Google Ads API</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/enable-google-ads-api.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Enable Google Ads API"
             title="Enabling Google Ads API"
             width="620"
             height="350" />
    </li>
    <li>
        Done! Let's proceed to the next step.
    </li>    
</ol>



<h4>Step-3: Create Service Account</h4>
<p>
    Use the steps below to create a Service Account in Google Cloud:
</p>
<ol>    
    <li>
        <p>
            First of all, go to 
            <a target="_blank" href="https://console.cloud.google.com/iam-admin/iam">IAM & Admin</a> 
            in Google Cloud console:
        </p>
        
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/access-iam-and-admin-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Access IAM & Admin in Google Cloud" 
             title="Accessing IAM & Admin in Google Cloud" 
             width="690" 
             height="510" /> 
    </li>
    <li>        
        <p>
            Once you do that, click <strong>Service Accounts</strong> on the left side 
            and click <strong>CREATE SERVICE ACCOUNT</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/start-creating-service-account-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Start creating service account in Google Cloud" 
             title="Starting creating service account in Google Cloud" 
             width="1000" 
             height="500" /> 
    </li>
    <li>
        <p>
            Then name your service account and click <strong>CREATE AND CONTINUE</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/create-service-account-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Create service account in Google Cloud" 
             title="Creating service account in Google Cloud" 
             width="750" 
             height="450" /> 
    </li>
    <li>
        <p>
            Continue by clicking <strong>Select a role</strong> dropdown 
            and start granting service account Project Viewer roles:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/start-granting-service-account-project-roles-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Start granting service account project roles in Google Cloud" 
             title="Starting granting service account project roles in Google Cloud" 
             width="750" 
             height="250" /> 
    </li>     
    <li>
        <p>
            Find <strong>Project</strong> group 
            and select <strong>Viewer</strong> role:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/grant-service-account-project-viewer-role.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Grant service account project viewer role" 
             title="Granting service account project viewer role" 
             width="540" 
             height="410" />                  
    </li>
    <li>
        <p>
            Finish adding roles by clicking <strong>CONTINUE</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/finish-granting-service-account-project-roles-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Finish granting service account project roles in Google Cloud" 
             title="Finishing granting service account project roles in Google Cloud" 
             width="750" 
             height="370" /> 
            
        <div class="alert alert-info alert-title">
            You can always add or modify permissions later in 
            <a target="_blank" href="https://console.cloud.google.com/iam-admin/iam">IAM & Admin</a>.
        </div>
    </li>
    <li>
        <p>
            Finally, in the last step, just click button <strong>DONE</strong>:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/finish-configuring-service-account-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Finish configuring service account in Google Cloud" 
             title="Finishing configuring service account in Google Cloud" 
             width="750" 
             height="350" /> 
    </li>
    <li>
        <p>
            Done! We are ready to add a Key to this service account in the next step.
        </p>
    </li>        
</ol>



<h4>Step-4: Add Key to Service Account</h4>
<p>
    We are ready to add a Key (JSON or P12 key file) to the created Service Account:
</p>
<ol>    
    <li>
        <p>
            In <a target="_blank" href="https://console.cloud.google.com/iam-admin/serviceaccounts">Service Accounts</a>
            open newly created service account:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/open-service-account-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Open service account in Google Cloud" 
             title="Opening service account in Google Cloud" 
             width="750" 
             height="350" /> 
    </li>    
    <li>
        <p>
            Next, copy email address of your service account for the later step:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/copy-service-account-email-address-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Copy service account email address in Google Cloud" 
             title="Copying service account email address in Google Cloud" 
             width="600" 
             height="370" /> 
    </li>
    <li>
        <p>
            Continue by selecting <strong>KEYS</strong> tab, 
            then press <strong>ADD KEY</strong> dropdown, 
            and click <strong>Create new key menu</strong> item:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/start-creating-key-for-service-account-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Start creating key for service account in Google Cloud" 
             title="Starting creating key for service account in Google Cloud" 
             width="750" 
             height="530" /> 
    </li>
    <li>
        <p>
            Finally, select <strong>JSON</strong> (Engine v19+) or <strong>P12</strong> option and hit <strong>CREATE</strong> button:
        </p>
        <img src="https://cdn.zappysys.com/api/Images/authentication/google/Service-Account/create-p12-key-for-service-account-in-google-cloud.png" 
             loading="lazy" 
             decoding="async" 
             class="img-thumbnail block" 
             alt="Create JSON or P12 key for service account in Google Cloud" 
             title="Creating JSON or P12 key for service account in Google Cloud" 
             width="600" 
             height="400" /> 
    </li>    
    <li>
        Key file downloads into your machine. We have all the data needed for authentication, let's proceed to the last step!
    </li>
</ol>

<h4>Step-5: Give Permissions to Service Account</h4>
<p>
    Now it's time to grant permission to Service Account we just created:
</p>
<ol>
    <li>Login to https://ads.google.com/aw/settings/account with Google Ads account credentials (If propmpted choose your Ads account).</li>      
    <li>
	   <p>
		  Go to <strong>Admin</strong> section, <strong>Access and security</strong>, Click on <strong>Users</strong> tab.
	   </p>
    </li>      
	<li>Click on Add Icon (+) and enter service account email address which you like to use for data access and choose permissions.</li>      	
    <li>
	   That's it! Let's proceed to the configuration!
    </li>
</ol>



<h3>Step-6: Configure connection</h3>
<ol>
    <li>
        <p>
            Now go to SSIS package or ODBC data source and configure these fields in <strong>Service Account</strong> authentication configuration:
        </p>
	   <ul>
            <li>In the <strong>Service Account Email</strong> field paste the service account <strong>Email address</strong> value you copied in the previous step.</li>        
            <li>In the <strong>Service Account Private Key Path (i.e. *.json OR *.p12)</strong> field use downloaded key file path.</li>
       </ul>
    </li>       
    <li>
        Done! Now you are ready to use Google Ads Connector!
    </li>
</ol>
If you received an error saying <strong>DEVELOPER_TOKEN_PROHIBITED</strong> then read the following workaround.  
<div class="alert alert-info alert-title">Each Google API Console project can be associated with the developer token from only one manager account. Once you make a Google Ads API request, the developer token is permanently paired to the Google API Console project. If you don't use a new Google API Console project, you'll get a DEVELOPER_TOKEN_PROHIBITED error when making a request. Unfortunatly there is no other way to Unlink old Developer Token from the API Project, so for now just create a new Project as a workaround to fix this error.</div>

]]>
			</Notes>
		</Auth>

	</Auths>


	<Template>
		<Param Name="CustomerIdParam" Required="True" Label="CustomerId (without dash e.g. 2125557752)" 
			Desc="Login to your Google Ads account and see top-right corner for your CustomerId"
			OptionsEndPoint="get_linked_customers" OptionsEndPointValueColumn="Id"
			ValueTemplate="&lt;&lt;{$value$}|~|-|~|,FUN_REPLACE&gt;&gt;"
			/>
		<Param Name="LoginCustomerIdParam" Label="Login CustomerId (without dash e.g. 2125557752)" 
			ValueTemplate="&lt;&lt;{$value$}|~|-|~|,FUN_REPLACE&gt;&gt;" 
			Desc=" This is generally the identifier associated with the customer who is performing the action or making the API request. It refers to the customer whose credentials are being used to authenticate and authorize the API call."
			Type="Header" Key="login-customer-id" SkipBlankHeader="True" />
			
		<Param Name="LinkedCustomerIdParam" Label="Linked CustomerId (without dash e.g. 2125557752)" 
			ValueTemplate="&lt;&lt;{$value$}|~|-|~|,FUN_REPLACE&gt;&gt;" 
			Desc="This ID refers to the identifier of a different customer (or another entity) that is linked or associated with the login-customer-id. For example, this could represent a customer who is part of a family plan, a business account that has multiple users, or a parent-child relationship between customer accounts."
			Type="Header" Key="linked-customer-id" SkipBlankHeader="True"/>	
			
		<Param Name="ApiVersionParam" Label="API Version" Value="v19" Options="v19;v18;v17;v16;v15" />
		
		<Param Name="ResourceParam" Required="True" Value="Campaign" OptionsEndPoint="get_resources" OptionsEndPointValueColumn="Name" Functions="LOWER"/>			
			
		<Param Name="DeveloperTokenParam" Required="True" Type="Header" Key="Developer-Token" Desc="Login to your Ads Manager account. Go to Admin &gt; API Center and you will see Developer Token. Make sure access level is Basic or Standard if you wish to access Live Ads Account. If Access Level is Test then you can apply for live account access by clicking on Access Level and follow the link."/>
		<Param Name="DateParam"  				 
				Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31" 
				Required="True" Desc="The date for report data range in YYYY-MM-DD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)"
				ValueTemplate="&lt;&lt;{$value$}||yyyy-MM-dd,FUN_TO_DATE&gt;&gt;" />

		<EndPoint Name="ReportEndPoint" 
			Url="/customers/[$CustomerId$]/googleAds:search" 
			Method="POST" 
			ContentType="ApplicationJson"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview"
			>
			<Params>
				<Param Name="CustomerId" Template="CustomerIdParam" Required="False" />
				<Param Name="NextUrlAttributeOrExpr" Type="Property" Value="$.nextPageToken" />
				<Param Name="EnablePageTokenForBody" Type="Property" Value="True" />				
			</Params>			
		</EndPoint>
		<EndPoint Name="PerfReportEndPoint"
			Template="ReportEndPoint"
			Url="/customers/[$CustomerId$]/googleAds:search" 
			Method="POST" 
			Filter="$.results[*]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview"		
		>
			<Params>
				<Param Name="ReportStartDate" Template="DateParam" Label="Report Start Date (yyyy-MM-dd)" Value="today-30d" Desc="Server side filter for date"/>
				<Param Name="ReportEndDate" Template="DateParam" Label="Report End Date (yyyy-MM-dd)"  Value="today-1d"  Desc="Server side filter for date"/>
				<Param Name="CampaignId" Label="Campaign Id (Default: All)"  Desc="Server side filter for campaign" OptionsEndPoint="get_campaigns"  OptionsEndPointValueColumn="Id"  OptionsEndPointLabelColumn="Name" MultiSelectTemplate="{@value}" MultiSelectSeparator="','" MultiSelect="True" ValueTemplate=" AND campaign.id IN ('{$value$}')"/>
				<Param Name="CampaignStatus" Label="Campaign Status (Default: All)" Options="ENABLED;PAUSED;REMOVED;DRAFT;PENDING;ARCHIVED" MultiSelectSeparator="','" MultiSelect="True" MultiSelectTemplate="{@value}" ValueTemplate=" AND campaign.status IN ('{$value$}')"/>
			</Params>
			<OutputColumns>
				<Column Order="100" Name="campaign.id" Label="CampaignId" DataType="DT_WSTR" Length="30" />		
				<Column Order="110" Name="campaign.name" Label="CampaignName" DataType="DT_WSTR" Length="1000" />
				<Column Order="120" Name="metrics.clicks" Label="Clicks" DataType="DT_R8" />
				<Column Order="130" Name="metrics.conversions" Label="Conversions" DataType="DT_R8" />
				<Column Order="140" Name="metrics.costMicros"  Label="Cost" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="150" Name="metrics.costMicros"  Label="CostMicros" DataType="DT_I8" />
				<Column Order="160" Name="metrics.costPerConversion"  Label="CostPerConversion" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="170" Name="metrics.costPerConversion"  Label="CostPerConversionMicros" DataType="DT_I8"/>
				<Column Order="180" Name="metrics.impressions"  Label="Impressions" DataType="DT_I8" />
				<Column Order="190" Name="metrics.interactionRate" Label="InteractionRate" DataType="DT_R8" />
				<Column Order="191" Name="metrics.interactions" Label="Interactions" DataType="DT_I8" />
				<Column Order="192" Name="metrics.averagePageViews" Label="AveragePageViews" DataType="DT_R8" />
				<Column Order="193" Name="metrics.bounceRate" Label="BounceRate" DataType="DT_R8" />
				<Column Order="194" Name="metrics.searchAbsoluteTopImpressionShare" Label="SearchAbsoluteTopImpressionShare" DataType="DT_R8" />
				<Column Order="195" Name="metrics.searchBudgetLostAbsoluteTopImpressionShare" Label="SearchBudgetLostAbsoluteTopImpressionShare" DataType="DT_R8" />
				<Column Order="196" Name="metrics.searchBudgetLostImpressionShare" Label="SearchBudgetLostImpressionShare" DataType="DT_R8" />
				<Column Order="197" Name="metrics.searchBudgetLostTopImpressionShare" Label="SearchBudgetLostTopImpressionShare" DataType="DT_R8" />
				<Column Order="198" Name="metrics.searchClickShare" Label="SearchClickShare" DataType="DT_R8" />
				<Column Order="199" Name="metrics.searchExactMatchImpressionShare" Label="SearchExactMatchImpressionShare" DataType="DT_R8" />
				<Column Order="200" Name="metrics.searchImpressionShare" Label="SearchImpressionShare" DataType="DT_R8" />
				<Column Order="210" Name="metrics.searchRankLostAbsoluteTopImpressionShare" Label="SearchRankLostAbsoluteTopImpressionShare" DataType="DT_R8" />
				<Column Order="220" Name="metrics.searchRankLostImpressionShare" Label="SearchRankLostImpressionShare" DataType="DT_R8" />
				<Column Order="230" Name="metrics.searchRankLostTopImpressionShare" Label="SearchRankLostTopImpressionShare" DataType="DT_R8" />
				<Column Order="240" Name="metrics.searchTopImpressionShare" Label="SearchTopImpressionShare" DataType="DT_R8" />
				<Column Order="250" Name="metrics.topImpressionPercentage" Label="TopImpressionPercentage" DataType="DT_R8" />
				<Column Order="260" Name="metrics.videoViews" Label="VideoViews" DataType="DT_I8" />
				<Column Order="270" Name="metrics.viewThroughConversions" Label="ViewThroughConversions" DataType="DT_I8" />
				<Column Order="280" Name="metrics.ctr" Label="Ctr" DataType="DT_R8" />
				<Column Order="290" Name="metrics.engagements" Label="Engagements" DataType="DT_I8" />
				<Column Order="300" Name="metrics.absoluteTopImpressionPercentage" Label="AbsoluteTopImpressionPercentage" DataType="DT_R8" />
				<Column Order="310" Name="metrics.activeViewImpressions" Label="ActiveViewImpressions" DataType="DT_I8" />
				<Column Order="320" Name="metrics.allConversions" Label="AllConversions" DataType="DT_R8" />
				<Column Order="330" Name="metrics.averageCost" Label="AverageCost" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="340" Name="metrics.averageCost" Label="AverageCostMicro" DataType="DT_R8" />
				<Column Order="350" Name="metrics.averageCpc" Label="AverageCpc" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="360" Name="metrics.averageCpc" Label="AverageCpcMicro" DataType="DT_R8" />
				<Column Order="370" Name="metrics.averageCpm" Label="AverageCpm" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="380" Name="metrics.averageCpm" Label="AverageCpmMicro" DataType="DT_R8" />
				<Column Order="390" Name="metrics.averageCpv" Label="AverageCpv" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="400" Name="metrics.averageCpv" Label="AverageCpvMicro" DataType="DT_R8" />
				<Column Order="410" Name="metrics.averageCpe" Label="AverageCpe" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="420" Name="metrics.averageCpe" Label="AverageCpeMicro" DataType="DT_R8" />
				<Column Order="430" Name="metrics.invalidClicks" Label="InvalidClicks" DataType="DT_I8" />
				<Column Order="440" Name="metrics.costPerAllConversions" Label="CostPerAllConversions" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="450" Name="metrics.costPerAllConversions" Label="CostPerAllConversionsMicro" DataType="DT_I8" />
				<Column Order="460" Name="metrics.contentImpressionShare" Label="ContentImpressionShare" DataType="DT_R8" />
				<Column Order="470" Name="metrics.contentBudgetLostImpressionShare" Label="ContentBudgetLostImpressionShare" DataType="DT_R8" />
				<Column Order="480" Name="metrics.engagementRate" Label="EngagementRate" DataType="DT_R8" />
				<Column Order="490" Name="metrics.videoviewRate" Label="VideoviewRate" DataType="DT_R8" />
				<Column Order="500" Name="metrics.videoQuartileP75Rate" Label="VideoQuartileP75Rate" DataType="DT_R8" />
				<Column Order="510" Name="metrics.videoQuartileP50Rate" Label="VideoQuartileP50Rate" DataType="DT_R8" />
				<Column Order="520" Name="metrics.videoQuartileP25Rate" Label="VideoQuartileP25Rate" DataType="DT_R8" />
				<Column Order="530" Name="metrics.videoQuartileP100rate" Label="VideoQuartileP100rate" DataType="DT_R8" />
				<Column Order="540" Name="metrics.activeViewCpm" Label="ActiveViewCpm" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Order="550" Name="metrics.activeViewCpm" Label="ActiveViewCpmMicro" DataType="DT_R8" />
				<Column Order="560" Name="metrics.activeViewCtr" Label="ActiveViewCtr" DataType="DT_R8" />	
 			
			</OutputColumns>
		</EndPoint>
	</Template>

	<EndPoints>
	

		<EndPoint Name="get_report_campaign_performance_by_date" 
			Template="PerfReportEndPoint" 
			Label="Get Report: Campaign Performance (By Date)" 
			Desc="Get campaign performance data by date. If you like to customize this report then use get_query_result endpoint."
			>
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT 
  segments.date 
--, segments.year   
--, segments.month
--, segments.week
--, segments.day_of_week
--, segments.quarter
, campaign.id
, campaign.name
, metrics.all_conversions
, metrics.average_cpc
, metrics.average_cost
, metrics.average_cpv
, metrics.average_cpm
, metrics.average_cpe
, metrics.average_impression_frequency_per_user
, metrics.average_page_views
, metrics.bounce_rate
, metrics.clicks
, metrics.conversions
, metrics.content_impression_share
, metrics.content_budget_lost_impression_share
, metrics.cost_micros
, metrics.cost_per_all_conversions
, metrics.cost_per_conversion
, metrics.ctr
, metrics.engagement_rate
, metrics.engagements
--, metrics.general_invalid_click_rate
--, metrics.general_invalid_clicks
, metrics.impressions
, metrics.interaction_rate
, metrics.interactions
, metrics.invalid_clicks
, metrics.search_absolute_top_impression_share
, metrics.search_budget_lost_absolute_top_impression_share
, metrics.search_budget_lost_impression_share
, metrics.search_budget_lost_top_impression_share
, metrics.search_click_share
, metrics.search_impression_share
, metrics.video_view_rate
, metrics.video_quartile_p75_rate
, metrics.video_quartile_p50_rate
, metrics.video_quartile_p25_rate
, metrics.video_quartile_p100_rate
, metrics.video_views
, metrics.view_through_conversions
, metrics.unique_users
, metrics.top_impression_percentage
, metrics.search_rank_lost_top_impression_share
, metrics.search_rank_lost_impression_share
, metrics.search_rank_lost_absolute_top_impression_share
, metrics.search_top_impression_share
, metrics.search_exact_match_impression_share
, metrics.absolute_top_impression_percentage
, metrics.active_view_cpm
, metrics.active_view_ctr
, metrics.active_view_impressions
FROM campaign 
WHERE segments.date BETWEEN '[$ReportStartDate$]' and '[$ReportEndDate$]'
[$CampaignId$]
[$CampaignStatus$]
ORDER BY segments.date DESC,campaign.name
" }]]>
			</Body>
			<Params>

			</Params>
			<OutputColumns>
				<Column Order="10" Name="segments.date" Label="Date" DataType="DT_DBDATE" />		
				<Column Order="11" Name="segments.date" Label="Year" DataType="DT_I4" ValueTemplate="&lt;&lt;+0s|~|yyyy|~|{$value$},FUN_TO_DATE&gt;&gt;"/>
				<Column Order="12" Name="segments.date" Label="Month" DataType="DT_I4" ValueTemplate="&lt;&lt;+0s|~|MM|~|{$value$},FUN_TO_DATE&gt;&gt;"/>		
				<Column Order="13" Name="segments.date" Label="Day" DataType="DT_I4" ValueTemplate="&lt;&lt;+0s|~|dd|~|{$value$},FUN_TO_DATE&gt;&gt;"/>		
				<Column Order="14" Name="segments.date" Label="Week" DataType="DT_I4" ValueTemplate="&lt;&lt;+0s|~|wk|~|{$value$},FUN_TO_DATE&gt;&gt;"/>
				<Column Order="15" Name="segments.date" Label="Quarter" DataType="DT_WSTR" Length="10" ValueTemplate="&lt;&lt;+0s|~|qqqq|~|{$value$},FUN_TO_DATE&gt;&gt;"/>
				<Column Order="16" Name="segments.date" Label="DayOfWeek" DataType="DT_WSTR" Length="10" ValueTemplate="&lt;&lt;+0s|~|ddd|~|{$value$},FUN_TO_DATE&gt;&gt;"/>

				<Column Order="998" Name="metrics.uniqueUsers" Label="UniqueUsers" DataType="DT_R8" />	
				<Column Order="999" Name="metrics.averageImpressionFrequencyPerUser" Label="AverageImpressionFrequencyPerUser" DataType="DT_R8" />

			</OutputColumns>
		</EndPoint>

		<EndPoint Name="get_report_campaign_performance_by_month" 
		    Template="PerfReportEndPoint" 
			Label="Get Report: Campaign Performance (By Year and Month)" 
			Desc="Get campaign performance data by year and month. If you like to customize this report then use get_query_result endpoint."
			>
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT 
  segments.month
--, segments.week
--, segments.day_of_week
--, segments.quarter
, campaign.id
, campaign.name
, metrics.all_conversions
, metrics.average_cpc
, metrics.average_cost
, metrics.average_cpv
, metrics.average_cpm
, metrics.average_cpe
--, metrics.average_impression_frequency_per_user
, metrics.average_page_views
, metrics.bounce_rate
, metrics.clicks
, metrics.conversions
, metrics.content_impression_share
, metrics.content_budget_lost_impression_share
, metrics.cost_micros
, metrics.cost_per_all_conversions
, metrics.cost_per_conversion
, metrics.ctr
, metrics.engagement_rate
, metrics.engagements
--, metrics.general_invalid_click_rate
--, metrics.general_invalid_clicks
, metrics.impressions
, metrics.interaction_rate
, metrics.interactions
, metrics.invalid_clicks
, metrics.search_absolute_top_impression_share
, metrics.search_budget_lost_absolute_top_impression_share
, metrics.search_budget_lost_impression_share
, metrics.search_budget_lost_top_impression_share
, metrics.search_click_share
, metrics.search_impression_share
, metrics.video_view_rate
, metrics.video_quartile_p75_rate
, metrics.video_quartile_p50_rate
, metrics.video_quartile_p25_rate
, metrics.video_quartile_p100_rate
, metrics.video_views
, metrics.view_through_conversions
--, metrics.unique_users
, metrics.top_impression_percentage
, metrics.search_rank_lost_top_impression_share
, metrics.search_rank_lost_impression_share
, metrics.search_rank_lost_absolute_top_impression_share
, metrics.search_top_impression_share
, metrics.search_exact_match_impression_share
, metrics.absolute_top_impression_percentage
, metrics.active_view_cpm
, metrics.active_view_ctr
, metrics.active_view_impressions
FROM campaign 
WHERE segments.date BETWEEN '[$ReportStartDate$]' and '[$ReportEndDate$]'
[$CampaignId$]
[$CampaignStatus$]
ORDER BY segments.month DESC,campaign.name
" }]]>
			</Body>
			<Params>
			</Params>
			<OutputColumns>
				<Column Order="10" Name="segments.month" Label="Year" DataType="DT_I4" ValueTemplate="&lt;&lt;+0s|~|yyyy|~|{$value$},FUN_TO_DATE&gt;&gt;"/>
				<Column Order="11" Name="segments.month" Label="Month" DataType="DT_I4" ValueTemplate="&lt;&lt;+0s|~|MM|~|{$value$},FUN_TO_DATE&gt;&gt;"/>		
				<Column Order="12" Name="segments.month" Label="Quarter" DataType="DT_WSTR" Length="10" ValueTemplate="&lt;&lt;+0s|~|qqqq|~|{$value$},FUN_TO_DATE&gt;&gt;"/>

			</OutputColumns>
		</EndPoint>
		
		<EndPoint Name="get_query_result" 
		    IsSqlEndPoint="True"
			MetaScanRows="10000"
			Template="ReportEndPoint" 
			Label="Query Google Ads data (Using GAQL - Google Ads Query Language)" 
			Desc="Get Google Ads report data using GAQL (Google Ads Query Language) SQL query. Use Query builder from this link to select fields, segments, and metrics https://developers.google.com/google-ads/api/fields/v18/overview_query_builder (Click on Resource type you like to query) for SELECT, FROM and ORDER BY"
			Filter="$.results[*]"
			UseRawCache="True"
			CachedTtl="10"
		>
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "[$Query,FUN_JSONENC$]" }]]>
			</Body>
			<Params> 
				<Param Name="Filter" Value="$.results[*]" Options="$.results[*];$.results[*].campaign;$.results[*].customer;$.results[*].anything_here"/>
				<Param Name="Query" Required="True" IsSqlParameter="True" Label="Enter Query (i.e. GAQL sql)" 
					Value="
--Build query from here and then paste below https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
SELECT campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros
FROM campaign 
WHERE campaign.status = 'ENABLED'
ORDER BY campaign.id
LIMIT 1000" 
					Editor="MultiLine"
					/>				
			</Params>
			<OutputColumns>
			</OutputColumns>
		</EndPoint>

		<EndPoint Name="get_resources" 
			Template="ReportEndPoint" 
			Label="Get Resources (For GAQL)" 
			Desc="Get resources you can query for GAQL"
			Url="/googleAdsFields:search" 
			Method="POST" 
			Filter="$.results[*].segments[0]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			UseRawCache="True"
			CacheTtl="100"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT segments, metrics" }]]>
			</Body>
			<OutputColumns>
				<Column Name="P_results_resourceName" Label="Name" ValueTemplate="&lt;&lt;{$value$}|~|googleAdsFields/|~|,FUN_REPLACE&gt;&gt;" />
				<Column Name="P_results_resourceName" Label="ResourceName"  />
			</OutputColumns>
		</EndPoint>
		
		<EndPoint Name="get_resource_segments" 
			Template="ReportEndPoint" 
			Label="Get Resource Segments (For GAQL)" 
			Desc="Get segments (Group By Fields) for all or selected resource using GAQL"
			Url="/googleAdsFields:search" 
			Method="POST" 
			Filter="$.results[*].segments[*]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			UseRawCache="True"
			CacheTtl="100"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT segments [$Resource$]" }]]>
			</Body>
			<Params>
				<Param Name="Resource" Template="ResourceParam" Required="True"  ValueTemplate=" WHERE name='{$value$}'"/>
			</Params>
			<OutputColumns>
				<Column Name="segments" Label="Name"  />
				<Column Name="P_results_resourceName" Label="ResourceName"  />
			</OutputColumns>			
		</EndPoint>
		<EndPoint Name="get_resource_metrics" 
			Template="ReportEndPoint" 
			Label="Get Resource Metrics (For GAQL)" 
			Desc="Get metrics you can query (for all or selected resource) using GAQL, Numeric fields which can be aggregated (e.g. clicks, impressions)"
			Url="/googleAdsFields:search" 
			Method="POST" 
			Filter="$.results[*].metrics[*]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			UseRawCache="True"
			CacheTtl="100"			
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT metrics [$Resource$]" }]]>
			</Body>
			<Params>
				<Param Name="Resource" Template="ResourceParam" Required="True"  ValueTemplate=" WHERE name='{$value$}'"/>
			</Params>
			<OutputColumns>
				<Column Name="metrics" Label="Name"  />
				<Column Name="P_results_resourceName" Label="ResourceName"  />
			</OutputColumns>			
		</EndPoint>		
		<EndPoint Name="get_resource_attributes" 
			Template="ReportEndPoint" 
			Label="Get Resource Attributes (For GAQL)" 
			Desc="Get attributes you can query (for all or selected resource) using GAQL"
			Url="/googleAdsFields:search" 
			Method="POST" 
			Filter="$.results[*]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			UseRawCache="True"
			CacheTtl="100"			
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT name, category, data_type [$Resource$] ORDER BY name" }]]>
			</Body>
			<Params>
				<Param Name="Resource" Template="ResourceParam" Required="True" ValueTemplate=" WHERE name like '{$value$}.%'"/>
			</Params>
			<OutputColumns>
				<Column Name="name" Label="Name"  />
				<Column Name="category" Label="Category"  />
				<Column Name="dataType" Label="DataType"  />				
				<Column Name="resourceName" Label="ResourceName"  />
			</OutputColumns>			
		</EndPoint>			
		
		<EndPoint Name="get_resource_data" 
			MetaScanRows="10000"
			Template="ReportEndPoint" 
			Label="Get Resource Data (Query Attributes, Segments, Metrics)" 
			Desc="Get Google Ads resource data without supplying GAQL, easy to use Query Builder to fetch data from any object by its Resource name."
			Filter="$.results[*]"
			UseRawCache="True"
			CachedTtl="50"
		>
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "<<SELECT [$Segments$] [$Metrics$] [$Attributes$] 
FROM [$Resource$]
[$Where$]
[$OrderBy$]
[$Limit$],FUN_JSONENC>>" }]]>
			</Body>
			<Params> 
				<Param Name="Filter" Required="True" Value="$.results[*]" Options="$.results[*];$.results[*].campaign;$.results[*].customer;$.results[*].anything_here"/>
				<Param Name="Resource" Template="ResourceParam" Required="True" />
				<Param Name="Attributes" Required="False" Label="Attributes (Leave blank to select all)" 
					OptionsEndPoint="get_resource_attributes" OptionsEndPointValueColumn="Name" 
					OptionsEndPointParameters="Resource=[$Resource$]" 
					MultiSelect="True" 
					MultiSelectAllOnBlank="True" MultiSelectSeparator="," 
					/>
					
				<Param Name="Segments" Label="Segments (Group By)" OptionsEndPoint="get_resource_segments" OptionsEndPointValueColumn="Name" OptionsEndPointParameters="Resource=[$Resource$]" MultiSelect="True" MultiSelectSeparator=","  ValueTemplate="{$value$}," />
				<Param Name="Metrics" Label="Metrics (Aggregate Fields)" OptionsEndPoint="get_resource_metrics" OptionsEndPointValueColumn="Name" OptionsEndPointParameters="Resource=[$Resource$]" MultiSelect="True" MultiSelectSeparator=","  ValueTemplate="{$value$}," />
				<Param Name="Where" Label="Where Clause" RequiredIf="Metrics" VisibleIf="Metrics" 
					Options="Example1=segments.date DURING LAST_30_DAYS;
Example2=segments.date &gt; '&lt;&lt;monthstart-1d,FUN_TO_DATE&gt;&gt;' AND segments.date &lt; '&lt;&lt;today,FUN_TO_DATE&gt;&gt;';
Example3=metrics.impressions &gt; 10 AND segments.date &gt; '&lt;&lt;monthstart-1d,FUN_TO_DATE&gt;&gt;' AND segments.date &lt; '&lt;&lt;today,FUN_TO_DATE&gt;&gt;';
Example4=campaign.status='ENABLED' AND metrics.impressions &gt; 10 AND segments.date &gt; '&lt;&lt;monthstart-1d,FUN_TO_DATE&gt;&gt;'  AND segments.date &lt; '&lt;&lt;today,FUN_TO_DATE&gt;&gt;'
"
 ValueTemplate=" WHERE {$value$}"
 />
				<Param Name="OrderBy" Label="OrderBy Clause" Options="Example1=segments.date;Example2=segments.date DESC;Example3=segments.year DESC,segments.month ASC" ValueTemplate=" ORDER BY {$value$}"/>
				<Param Name="Limit" Label="Limit Clause (i.e. Max Rows) - Blank means all rows" Options="Example1 (All Rows - Keep Blank)=;Example2=1000" ValueTemplate=" LIMIT {$value$}"/>					
			</Params>
			<OutputColumns>
			</OutputColumns>
		</EndPoint>

		
		<EndPoint Name="get_linked_customers" 
			Label="Get Linked Customers (For Manager Account)" 
			Desc="Get Linked Customers (Must be using Manager Account)"
			Url="/customers:listAccessibleCustomers" 
			Method="GET" 
			Filter="$.resourceNames[*]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview"
			>
			<OutputColumns>
				<Column Name="resourceNames" Label="Id" ValueTemplate="&lt;&lt;{$value$}|~|customers/|~|,FUN_REPLACE&gt;&gt;" />
				<Column Name="resourceNames" Label="ResourceNames"  />
			</OutputColumns>
		</EndPoint>	
		
		<EndPoint Name="get_customers" 
			Template="ReportEndPoint" 
			Label="Get Customers" 
			Desc="Get Google Ads customer data"
			Url="/customers/[$CustomerId$]/googleAds:search" 
			Method="POST" 
			Filter="$.results[*].customer"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT customer.auto_tagging_enabled, customer.call_reporting_setting.call_conversion_action, customer.call_reporting_setting.call_conversion_reporting_enabled, customer.call_reporting_setting.call_reporting_enabled, customer.conversion_tracking_setting.accepted_customer_data_terms, customer.conversion_tracking_setting.conversion_tracking_id, customer.conversion_tracking_setting.conversion_tracking_status, customer.conversion_tracking_setting.cross_account_conversion_tracking_id, customer.conversion_tracking_setting.enhanced_conversions_for_leads_enabled, customer.conversion_tracking_setting.google_ads_conversion_customer, customer.currency_code, customer.customer_agreement_setting.accepted_lead_form_terms, customer.descriptive_name, customer.final_url_suffix, customer.has_partners_badge, customer.id, customer.image_asset_auto_migration_done, customer.image_asset_auto_migration_done_date_time, customer.local_services_settings.granular_insurance_statuses, customer.local_services_settings.granular_license_statuses, customer.location_asset_auto_migration_done, customer.location_asset_auto_migration_done_date_time, customer.manager, customer.optimization_score, customer.optimization_score_weight, customer.pay_per_conversion_eligibility_failure_reasons, customer.remarketing_setting.google_global_site_tag, customer.resource_name, customer.status, customer.test_account, customer.time_zone, customer.tracking_url_template, customer.video_brand_safety_suitability FROM customer" }]]>
			</Body>
			<Params> 		
			</Params>
			<OutputColumns>
				<Column Name="id" Label="Id" DataType="DT_WSTR" Length="50" />
				<Column Name="descriptiveName" Label="DescriptiveName" DataType="DT_WSTR" Length="500" />
				<Column Name="status" Label="Status" DataType="DT_WSTR" Length="100" />				
				<Column Name="manager" Label="Manager" DataType="DT_BOOL" />
				<Column Name="testAccount" Label="TestAccount" DataType="DT_BOOL" />

				<Column Name="resourceName" Label="ResourceName" DataType="DT_WSTR" Length="500" />
				<Column Name="callReportingSetting.callReportingEnabled" Label="CallReportingSettingCallReportingEnabled" DataType="DT_BOOL" />
				<Column Name="callReportingSetting.callConversionReportingEnabled" Label="CallReportingSettingCallConversionReportingEnabled" DataType="DT_BOOL" />
				<Column Name="callReportingSetting.callConversionAction" Label="CallReportingSettingCallConversionAction" DataType="DT_WSTR" Length="500" />
				<Column Name="conversionTrackingSetting.conversionTrackingId" Label="ConversionTrackingSettingConversionTrackingId" DataType="DT_WSTR" Length="100" />
				<Column Name="conversionTrackingSetting.acceptedCustomerDataTerms" Label="ConversionTrackingSettingAcceptedCustomerDataTerms" DataType="DT_BOOL" />
				<Column Name="conversionTrackingSetting.conversionTrackingStatus" Label="ConversionTrackingSettingConversionTrackingStatus" DataType="DT_WSTR" Length="500" />
				<Column Name="conversionTrackingSetting.googleAdsConversionCustomer" Label="ConversionTrackingSettingGoogleAdsConversionCustomer" DataType="DT_WSTR" Length="500" />
				<Column Name="remarketingSetting.googleGlobalSiteTag" Label="RemarketingSettingGoogleGlobalSiteTag" DataType="DT_WSTR" Length="4000" />
				<Column Name="payPerConversionEligibilityFailureReasons" Label="PayPerConversionEligibilityFailureReasons" DataType="DT_WSTR" Length="500" />

				<Column Name="currencyCode" Label="CurrencyCode" DataType="DT_WSTR" Length="50" />
				<Column Name="timeZone" Label="TimeZone" DataType="DT_WSTR" Length="500" />
				<Column Name="trackingUrlTemplate" Label="TrackingUrlTemplate" DataType="DT_WSTR" Length="1080" />
				<Column Name="autoTaggingEnabled" Label="AutoTaggingEnabled" DataType="DT_BOOL" />
				<Column Name="hasPartnersBadge" Label="HasPartnersBadge" DataType="DT_BOOL" />
				<Column Name="optimizationScore" Label="OptimizationScore" DataType="DT_R8" />
				<Column Name="optimizationScoreWeight" Label="OptimizationScoreWeight" DataType="DT_R8" />

				<Column Name="locationAssetAutoMigrationDone" Label="LocationAssetAutoMigrationDone" DataType="DT_BOOL" />
				<Column Name="imageAssetAutoMigrationDone" Label="ImageAssetAutoMigrationDone" DataType="DT_BOOL" />
				<Column Name="locationAssetAutoMigrationDoneDateTime" Label="LocationAssetAutoMigrationDoneDateTime" DataType="DT_DBTIMESTAMP" />
				<Column Name="imageAssetAutoMigrationDoneDateTime" Label="ImageAssetAutoMigrationDoneDateTime" DataType="DT_DBTIMESTAMP" />
			</OutputColumns>
		</EndPoint>

		<EndPoint Name="get_campaigns" 
			Template="ReportEndPoint" 
			Label="Get Campaigns" Desc="Get Google Ads campaign data"
			Url="/customers/[$CustomerId$]/googleAds:search" 
			Method="POST" 
			Filter="$.results[*].campaign"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", "query": "SELECT campaign.accessible_bidding_strategy, campaign.ad_serving_optimization_status, campaign.advertising_channel_sub_type, campaign.advertising_channel_type, campaign.app_campaign_setting.app_id, campaign.app_campaign_setting.app_store, campaign.app_campaign_setting.bidding_strategy_goal_type, campaign.asset_automation_settings, campaign.audience_setting.use_audience_grouped, campaign.base_campaign, campaign.bidding_strategy, campaign.bidding_strategy_system_status, campaign.bidding_strategy_type, campaign.campaign_budget, campaign.campaign_group, campaign.commission.commission_rate_micros, campaign.demand_gen_campaign_settings.upgraded_targeting, campaign.dynamic_search_ads_setting.domain_name, campaign.dynamic_search_ads_setting.feeds, campaign.dynamic_search_ads_setting.language_code, campaign.dynamic_search_ads_setting.use_supplied_urls_only, campaign.end_date, campaign.excluded_parent_asset_field_types, campaign.excluded_parent_asset_set_types, campaign.experiment_type, campaign.final_url_suffix, campaign.fixed_cpm.goal, campaign.fixed_cpm.target_frequency_info.target_count, campaign.fixed_cpm.target_frequency_info.time_unit, campaign.frequency_caps, campaign.geo_target_type_setting.negative_geo_target_type, campaign.geo_target_type_setting.positive_geo_target_type, campaign.hotel_property_asset_set, campaign.hotel_setting.hotel_center_id, campaign.id, campaign.keyword_match_type, campaign.labels, campaign.listing_type, campaign.local_campaign_setting.location_source_type, campaign.local_services_campaign_settings.category_bids, campaign.manual_cpa, campaign.manual_cpc.enhanced_cpc_enabled, campaign.manual_cpm, campaign.manual_cpv, campaign.maximize_conversion_value.target_roas, campaign.maximize_conversions.target_cpa_micros, campaign.name, campaign.network_settings.target_content_network, campaign.network_settings.target_google_search, campaign.network_settings.target_google_tv_network, campaign.network_settings.target_partner_search_network, campaign.network_settings.target_search_network, campaign.network_settings.target_youtube, campaign.optimization_goal_setting.optimization_goal_types, campaign.optimization_score, campaign.payment_mode, campaign.percent_cpc.cpc_bid_ceiling_micros, campaign.percent_cpc.enhanced_cpc_enabled, campaign.performance_max_upgrade.performance_max_campaign, campaign.performance_max_upgrade.pre_upgrade_campaign, campaign.performance_max_upgrade.status, campaign.primary_status, campaign.primary_status_reasons, campaign.real_time_bidding_setting.opt_in, campaign.resource_name, campaign.selective_optimization.conversion_actions, campaign.serving_status, campaign.shopping_setting.advertising_partner_ids, campaign.shopping_setting.campaign_priority, campaign.shopping_setting.disable_product_feed, campaign.shopping_setting.enable_local, campaign.shopping_setting.feed_label, campaign.shopping_setting.merchant_id, campaign.shopping_setting.use_vehicle_inventory, campaign.start_date, campaign.status, campaign.target_cpa.cpc_bid_ceiling_micros, campaign.target_cpa.cpc_bid_floor_micros, campaign.target_cpa.target_cpa_micros, campaign.target_cpm.target_frequency_goal.target_count, campaign.target_cpm.target_frequency_goal.time_unit, campaign.target_cpv, campaign.target_impression_share.cpc_bid_ceiling_micros, campaign.target_impression_share.location, campaign.target_impression_share.location_fraction_micros, campaign.target_roas.cpc_bid_ceiling_micros, campaign.target_roas.cpc_bid_floor_micros, campaign.target_roas.target_roas, campaign.target_spend.cpc_bid_ceiling_micros, campaign.target_spend.target_spend_micros, campaign.targeting_setting.target_restrictions, campaign.tracking_setting.tracking_url, campaign.tracking_url_template, campaign.travel_campaign_settings.travel_account_id, campaign.url_custom_parameters, campaign.url_expansion_opt_out, campaign.vanity_pharma.vanity_pharma_display_url_mode, campaign.vanity_pharma.vanity_pharma_text, campaign.video_brand_safety_suitability, campaign.video_campaign_settings.video_ad_inventory_control.allow_in_feed, campaign.video_campaign_settings.video_ad_inventory_control.allow_in_stream, campaign.video_campaign_settings.video_ad_inventory_control.allow_shorts, campaign_budget.amount_micros FROM campaign" }]]>
			</Body>
			<Params> 		
			</Params>
			<OutputColumns>
				<Column Name="id" Label="Id" DataType="DT_WSTR" Length="30" />						
				<Column Name="name" Label="Name" DataType="DT_WSTR" Length="500" />
				<Column Name="status" Label="Status" DataType="DT_WSTR" Length="30" />
				<Column Name="startDate" Label="StartDate" DataType="DT_DBDATE" />
				<Column Name="endDate" Label="EndDate" DataType="DT_DBDATE" />
			
				<Column Name="P_results_campaignBudget_amountMicros" Label="CampaignBudgetAmount" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>			
				<Column Name="P_results_campaignBudget_amountMicros" Label="CampaignBudgetAmountMicros" DataType="DT_I8" />

				<Column Name="targetCpa.targetCpaMicros" Label="TargetCpa" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>	
				<Column Name="targetCpa.targetCpaMicros" Label="TargetCpaMicros" DataType="DT_I8" />
				
				<Column Name="maximizeConversions.targetCpaMicros" Label="MaximizeConversionsTargetCpa" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>	
				<Column Name="maximizeConversions.targetCpaMicros" Label="MaximizeConversionsTargetCpaMicros" DataType="DT_I8"  />
				
				<Column Name="keywordMatchType" Label="KeywordMatchType" DataType="DT_WSTR" Length="50" />				
				<Column Name="resourceName" Label="ResourceName" DataType="DT_WSTR" Length="500" />
				<Column Name="biddingStrategyType" Label="BiddingStrategyType" DataType="DT_WSTR" Length="100" />				
				<Column Name="finalUrlSuffix" Label="FinalUrlSuffix" DataType="DT_WSTR" Length="500" />
				<Column Name="adServingOptimizationStatus" Label="AdServingOptimizationStatus" DataType="DT_WSTR" Length="500" />
				<Column Name="advertisingChannelType" Label="AdvertisingChannelType" DataType="DT_WSTR" Length="500" />
				<Column Name="networkSettings.targetGoogleSearch" Label="NetworkSettingsTargetGoogleSearch" DataType="DT_BOOL" />
				<Column Name="networkSettings.targetSearchNetwork" Label="NetworkSettingsTargetSearchNetwork" DataType="DT_BOOL" />
				<Column Name="networkSettings.targetContentNetwork" Label="NetworkSettingsTargetContentNetwork" DataType="DT_BOOL" />
				<Column Name="networkSettings.targetPartnerSearchNetwork" Label="NetworkSettingsTargetPartnerSearchNetwork" DataType="DT_BOOL" />
				<Column Name="networkSettings.targetYoutube" Label="NetworkSettingsTargetYoutube" DataType="DT_BOOL" />
				<Column Name="networkSettings.targetGoogleTvNetwork" Label="NetworkSettingsTargetGoogleTvNetwork" DataType="DT_BOOL" />
				<Column Name="experimentType" Label="ExperimentType" DataType="DT_WSTR" Length="100" />
				<Column Name="servingStatus" Label="ServingStatus" DataType="DT_WSTR" Length="100" />
				
				<Column Name="dynamicSearchAdsSetting.domainName" Label="DynamicSearchAdsSettingDomainName" DataType="DT_WSTR" Length="500" />
				<Column Name="dynamicSearchAdsSetting.languageCode" Label="DynamicSearchAdsSettingLanguageCode" DataType="DT_WSTR" Length="50" />
				<Column Name="dynamicSearchAdsSetting.useSuppliedUrlsOnly" Label="DynamicSearchAdsSettingUseSuppliedUrlsOnly" DataType="DT_BOOL" />
				<Column Name="targetingSetting.targetRestrictions" Label="TargetingSettingTargetRestrictions" DataType="DT_WSTR" Length="1000" />
				<Column Name="geoTargetTypeSetting.positiveGeoTargetType" Label="GeoTargetTypeSettingPositiveGeoTargetType" DataType="DT_WSTR" Length="100" />
				<Column Name="geoTargetTypeSetting.negativeGeoTargetType" Label="GeoTargetTypeSettingNegativeGeoTargetType" DataType="DT_WSTR" Length="100" />
				<Column Name="paymentMode" Label="PaymentMode" DataType="DT_WSTR" Length="100" />
				<Column Name="baseCampaign" Label="BaseCampaign" DataType="DT_WSTR" Length="500" />
				<Column Name="labels" Label="Labels" DataType="DT_WSTR" Length="500" />
				<Column Name="biddingStrategySystemStatus" Label="BiddingStrategySystemStatus" DataType="DT_WSTR" Length="500" />
				<Column Name="primaryStatus" Label="PrimaryStatus" DataType="DT_WSTR" Length="100" />
				<Column Name="primaryStatusReasons" Label="PrimaryStatusReasons" DataType="DT_WSTR" Length="1050" />
				<Column Name="campaignBudget" Label="CampaignBudget" DataType="DT_WSTR" Length="500" />
				<Column Name="manualCpc.enhancedCpcEnabled" Label="ManualCpcEnhancedCpcEnabled" DataType="DT_BOOL" />
				<Column Name="campaignGroup" Label="CampaignGroup" DataType="DT_WSTR" Length="500" />
				<Column Name="advertisingChannelSubType" Label="AdvertisingChannelSubType" DataType="DT_WSTR" Length="100" />
				
				<Column Name="targetSpend.targetSpendMicros" Label="TargetSpend" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>	
				<Column Name="targetSpend.targetSpendMicros" Label="TargetSpendMicros" DataType="DT_I8"  />
				
				<Column Name="frequencyCaps" Label="FrequencyCaps" DataType="DT_WSTR" Length="4000" />
				<Column Name="videoBrandSafetySuitability" Label="VideoBrandSafetySuitability" DataType="DT_WSTR" Length="500" />
				<Column Name="assetAutomationSettings" Label="AssetAutomationSettings" DataType="DT_WSTR" Length="1090" />
				<Column Name="targetImpressionShare.location" Label="TargetImpressionShareLocation" DataType="DT_WSTR" Length="500" />
				
				<Column Name="targetImpressionShare.locationFractionMicros" Label="TargetImpressionShareLocationFraction" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>	
				<Column Name="targetImpressionShare.locationFractionMicros" Label="TargetImpressionShareLocationFractionMicros" DataType="DT_I8" />
				
				<Column Name="targetImpressionShare.cpcBidCeilingMicros" Label="TargetImpressionShareCpcBidCeiling" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>	
				<Column Name="targetImpressionShare.cpcBidCeilingMicros" Label="TargetImpressionShareCpcBidCeilingMicros" DataType="DT_I8" />
				
				<Column Name="urlExpansionOptOut" Label="UrlExpansionOptOut" DataType="DT_BOOL" />
				<Column Name="audienceSetting.useAudienceGrouped" Label="AudienceSettingUseAudienceGrouped" DataType="DT_BOOL" />
				<Column Name="performanceMaxUpgrade.performanceMaxCampaign" Label="PerformanceMaxUpgradePerformanceMaxCampaign" DataType="DT_WSTR" Length="500" />
				<Column Name="performanceMaxUpgrade.status" Label="PerformanceMaxUpgradeStatus" DataType="DT_WSTR" Length="500" />

				<Column Name="optimizationScore" Label="OptimizationScore" DataType="DT_R8" />
			</OutputColumns>
		</EndPoint>

		<EndPoint Name="get_campaign_keywords" 
			Template="ReportEndPoint" 
			Label="Get Campaign Keywords" Desc="Get Campaign Keywords (For all AdGroup)"
			Url="/customers/[$CustomerId$]/googleAds:search" 
			Method="POST" 
			Filter="$.results[*]"
			ContentType="ApplicationJson"
			IncludeParentColumns="True"
			HelpLink="https://developers.google.com/google-ads/api/docs/query/overview">
			<Body>
				<![CDATA[{ "pageToken":"[$pagetoken$]", 
				"query": "SELECT 
 campaign.id
,campaign.name
,campaign.status
,ad_group.id
,ad_group.name
,ad_group.status
,ad_group_criterion.criterion_id
,ad_group_criterion.keyword.text
,ad_group_criterion.keyword.match_type
,ad_group_criterion.status
,ad_group_criterion.cpc_bid_micros
,ad_group_criterion.cpm_bid_micros
,ad_group_criterion.approval_status
,ad_group_criterion.final_urls 
,ad_group_criterion.final_mobile_urls 
FROM keyword_view" 
				}]]>
			</Body>
			<Params> 		
			</Params>
			<OutputColumns>
				<Column Name="campaign.id" Label="CampaignId" DataType="DT_WSTR" Length="30" />				
				<Column Name="campaign.name" Label="CampaignName" DataType="DT_WSTR" Length="500" />			
				<Column Name="campaign.resourceName" Label="CampaignResourceName" DataType="DT_WSTR" Length="500" />
				<Column Name="campaign.status" Label="CampaignStatus" DataType="DT_WSTR" Length="50" />

				<Column Name="adGroup.id" Label="AdGroupId" DataType="DT_WSTR" Length="30" />
				<Column Name="adGroup.name" Label="AdGroupName" DataType="DT_WSTR" Length="500" />
				<Column Name="adGroup.resourceName" Label="AdGroupResourceName" DataType="DT_WSTR" Length="500" />
				<Column Name="adGroup.status" Label="AdGroupStatus" DataType="DT_WSTR" Length="50" />
				
				<Column Name="adGroupCriterion.criterionId" Label="CriterionId" Desc="This is Keyword Id" DataType="DT_WSTR" Length="30" />
				<Column Name="adGroupCriterion.status" Label="CriterionStatus" DataType="DT_WSTR" Length="30" />				
				<Column Name="adGroupCriterion.approvalStatus" Label="CriterionApprovalStatus" DataType="DT_WSTR" Length="30" />	
				<Column Name="adGroupCriterion.resourceName" Label="CriterionResourceName" DataType="DT_WSTR" Length="500" />
				<Column Name="adGroupCriterion.finalUrls" Label="CriterionFinalUrls" DataType="DT_WSTR" Length="2000" />
				<Column Name="adGroupCriterion.finalMobileUrls" Label="CriterionFinalMobileUrls" DataType="DT_WSTR" Length="2000" />
				<Column Name="adGroupCriterion.keyword.text" Label="KeywordText" DataType="DT_WSTR" Length="500" />
				<Column Name="adGroupCriterion.keyword.matchType" Label="KeywordMatchType" DataType="DT_WSTR" Length="100" />				
				<Column Name="adGroupCriterion.cpcBidMicros"  Label="KeywordCpcBid" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Name="adGroupCriterion.cpcBidMicros"  Label="KeywordCpcBidMicros" DataType="DT_I8" />				
				<Column Name="adGroupCriterion.cpmBidMicros"  Label="KeywordCpmBid" DataType="DT_R8" ValueTemplate="&lt;&lt;{$value$}#1000000|~|Div|~|double|~||~|false|~|0,FUN_CALC&gt;&gt;"/>
				<Column Name="adGroupCriterion.cpmBidMicros"  Label="KeywordCpmBidMicros" DataType="DT_I8" />								
				<Column Name="keywordView.resourceName" Label="KeywordResourceName" DataType="DT_WSTR" Length="1000" />
				
			</OutputColumns>			
		</EndPoint>
	</EndPoints>

	<Tables>
		<Table 
			Name="&lt;&lt;[$parent.P_results_resourceName$]|~|googleAdsFields/|~|,FUN_REPLACE&gt;&gt;" 
			Label=""
			Expand="True" 
			DataEndPoint="get_resources" 
			SelectEndPoint="get_resource_data">
			
			<Params>
				<Param Name="Resource" Value="&lt;&lt;[$parent.P_results_resourceName$]|~|googleAdsFields/|~|,FUN_REPLACE&gt;&gt;" Hidden="True" />
			</Params>

		</Table>
	</Tables>

	<Examples>	
		<Example Group="ODBC" Label="Get Campaigns" Desc="Get all Campaigns for Google Ads account">
			<Code>
				<![CDATA[SELECT * FROM get_campaigns]]>
			</Code>
		</Example>
		<Example Group="ODBC" Label="Get Customers" Desc="Get all customers you can query in your account">
			<Code>
				<![CDATA[SELECT * FROM get_customers]]>
			</Code>
		</Example>
		<Example Group="ODBC" Label="Get campaign performance report by date" Desc="Get campaign performance data, group by date and campaign">
			<Code>
				<![CDATA[SELECT * FROM get_report_campaign_performance_by_date WITH(ReportStartDate='monthstart', ReportEndDate='today-1d')]]>
			</Code>
		</Example>
		<Example Group="ODBC" Label="Get campaign performance report by month" Desc="Get campaign performance data, group by year, month and campaign">
			<Code>
				<![CDATA[SELECT * FROM get_report_campaign_performance_by_month WITH(ReportStartDate='monthstart', ReportEndDate='today-1d')]]>
			</Code>
		</Example>
		<Example Group="ODBC" Label="Get keywords information (all campaigns / ad groups)" Desc="Get keywords for all campaigns and all ad groups (criterion_id is basically keyword_id)">
			<Code>
				<![CDATA[select * from get_campaign_keywords]]>
			</Code>
		</Example>
		
		<Example Group="ODBC" Label="Get resource data (e.g. ad_group, ad_group_ad, keyword_view" Desc="Get data for any resource">
			<Code>
				<![CDATA[SELECT * FROM get_resource_data
WITH (
Resource='Campaign'

--//Optional Parameters 
--, Attributes='' --Keep blank to output all attributes
--OR--
--, Attributes='campaign.id~campaign.name~campaign.end_date' 

--, Metrics='metrics.clicks~metrics.impressions'
--, Segments='segments.year~segments.month'
--//must supply where clause if certain segments used (e.g. date, year, month)
--, Where='segments.date between ''<<yearstart,FUN_TO_DATE>>'' AND ''<<today-1d,FUN_TO_DATE>>'' '
--, OrderBy='segments.year DESC, segments.month ASC'
)

/*
--OR-- Simple Mode (Query by Resource Name in FROM clause).

Step-1: Findout all resource you can query using  
select * from get_resources

Step-2: Use resource name like below (in FROM)
Example resources (If data is missing it may throw error)

select * from ad_group
select * from ad_group_ad
select * from ad_group_ad_asset_combination_view
select * from ad_group_ad_asset_view
select * from ad_group_asset
select * from ad_group_audience_view
select * from ad_schedule_view
select * from age_range_view
select * from android_privacy_shared_key_google_ad_group
select * from android_privacy_shared_key_google_campaign
select * from android_privacy_shared_key_google_network_type
select * from asset
select * from asset_field_type_view
select * from asset_group
select * from asset_group_asset
select * from asset_group_product_group_view
select * from asset_group_top_combination_view
select * from asset_set_asset
select * from asset_set_type_view
select * from bidding_strategy
select * from campaign
select * from campaign_aggregate_asset_view
select * from campaign_asset
select * from campaign_audience_view
select * from campaign_budget
select * from campaign_group
select * from campaign_search_term_insight
select * from channel_aggregate_asset_view
select * from click_view
select * from content_criterion_view
select * from conversion_action
select * from customer
select * from customer_asset
select * from customer_search_term_insight
select * from detail_placement_view
select * from display_keyword_view
select * from distance_view
select * from dynamic_search_ads_search_term_view
select * from expanded_landing_page_view
select * from gender_view
select * from geographic_view
select * from group_placement_view
select * from hotel_group_view
select * from hotel_performance_view
select * from hotel_reconciliation
select * from income_range_view
select * from keyword_view
select * from landing_page_view
select * from location_view
select * from managed_placement_view
select * from paid_organic_search_term_view
select * from parental_status_view
select * from per_store_view
select * from performance_max_placement_view
select * from product_group_view
select * from search_term_view
select * from shared_set
select * from shopping_performance_view
select * from shopping_product
select * from smart_campaign_search_term_view
select * from topic_view
select * from travel_activity_group_view
select * from travel_activity_performance_view
select * from user_location_view
select * from video
select * from webpage_view
*/				
				]]>
			</Code>
		</Example>		
		

		
		<Example Group="ODBC" Label="Query Google Ads data using GAQL (Google Ads Query Language)" 
		Desc="Get Google Ads report data using GAQL (Google Ads Query Language) SQL query. Use Query builder from this link to select fields, segments, and metrics https://developers.google.com/google-ads/api/fields/v18/overview_query_builder (Click on Resource type you like to query) for SELECT, FROM and ORDER BY">
			<Code>
				<![CDATA[
--Use Query Builder here https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
--Paste Generated query in Query='here'				

SELECT 
	[campaign.id] as id, 
	[campaign.name] as name, 
	[metrics.impressions] as impressions, 
	[metrics.clicks] as clicks, 
	[metrics.costMicros] / 1000000 as cost --//API returns Unit in Micro so to get actual value divide by 1000000
FROM get_query_result
WITH(
	  Filter='$.results[*]'
	, Query='SELECT  campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros 
FROM campaign 
WHERE campaign.status = ''ENABLED''
 AND metrics.impressions > 10
ORDER BY campaign.id
--LIMIT 1000
'
	--Set different Customer Id here if not supplied in connection settings
	--, CustomerId='1112223333'
)
]]>
			</Code>
		</Example>
		<Example Group="ODBC" IsDefault="True" Label="Query Google Ads data (Simple Mode) - using #DirectSQL prefix" 
		Desc="Get Google Ads report data using GAQL (Google Ads Query Language) - SQL query using simple mode. This example passes GAQL query to get_query_result endpoint with specifying endpoint details. You must prefix query with special tag #DirectSQL">
			<Code>
				<![CDATA[#DirectSQL 

--Use Query Builder here https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
--Paste Generated query below
				
SELECT  campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros
FROM campaign 
--WHERE campaign.status = 'ENABLED'
--ORDER BY campaign.id
--LIMIT 1000
]]>
			</Code>
		</Example>	
		<Example Group="ODBC" IsDefault="True" Label="Query Google Ads Campaign Performance Data (Metrics / Segments) - using #DirectSQL prefix" 
		Desc="Get Google Ads report data using GAQL (Google Ads Query Language) group by Date and Campaign. You must prefix query with special tag #DirectSQL">
			<Code>
				<![CDATA[#DirectSQL 

--Use Query Builder here https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
--Paste Generated query below

SELECT 
  segments.date 
, campaign.id
, campaign.name
, metrics.all_conversions
, metrics.average_cpc
, metrics.average_cost
, metrics.average_cpv
, metrics.average_cpm
, metrics.average_cpe
, metrics.average_impression_frequency_per_user
, metrics.average_page_views
, metrics.bounce_rate
, metrics.clicks
, metrics.conversions
, metrics.content_impression_share
, metrics.content_budget_lost_impression_share
, metrics.cost_micros
, metrics.cost_per_all_conversions
, metrics.cost_per_conversion
, metrics.ctr
, metrics.engagement_rate
, metrics.engagements
--, metrics.general_invalid_click_rate
--, metrics.general_invalid_clicks
, metrics.impressions
, metrics.interaction_rate
, metrics.interactions
, metrics.invalid_clicks
, metrics.search_absolute_top_impression_share
, metrics.search_budget_lost_absolute_top_impression_share
, metrics.search_budget_lost_impression_share
, metrics.search_budget_lost_top_impression_share
, metrics.search_click_share
, metrics.search_impression_share
, metrics.video_view_rate
, metrics.video_quartile_p75_rate
, metrics.video_quartile_p50_rate
, metrics.video_quartile_p25_rate
, metrics.video_quartile_p100_rate
, metrics.video_views
, metrics.view_through_conversions
, metrics.unique_users
, metrics.top_impression_percentage
, metrics.search_rank_lost_top_impression_share
, metrics.search_rank_lost_impression_share
, metrics.search_rank_lost_absolute_top_impression_share
, metrics.search_top_impression_share
, metrics.search_exact_match_impression_share
, metrics.absolute_top_impression_percentage
, metrics.active_view_cpm
, metrics.active_view_ctr
, metrics.active_view_impressions
FROM campaign 
WHERE segments.date BETWEEN '<<monthstart,FUN_TO_DATE>>' and '<<today-1d,FUN_TO_DATE>>'

--WHERE segments.date BETWEEN '2025-01-25' and '2025-02-25'
--AND WHERE campaign.status = 'ENABLED'
--ORDER BY segments.date,campaign.id
--LIMIT 1000
]]>
			</Code>
		</Example>


	</Examples>
</ApiConfig>