Skip to main content
All CollectionsGoogle Sheets FunctionsAds Data Plan Functions
GORILLA_SDSPENDCAMPAIGN() – Get total advertising spend of campaign between any period

GORILLA_SDSPENDCAMPAIGN() – Get total advertising spend of campaign between any period

Updated over 2 months ago

GORILLA_SDSPENDCAMPAIGN() – Get total advertising spend of campaign between any period

Sample Usage

🚨 Use ranges (e.g.A2:A1000) in your formula wherever possible for quicker results and to prevent Google from blocking your account for 24 hrs due to overloading their resources. 
=GORILLA_SDSPENDCAMPAIGN("TOY STORE", "2023")
=GORILLA_SDSPENDCAMPAIGN("TOY STORE", "2023", "US")
=GORILLA_SDSPENDCAMPAIGN("TOY STORE", "2023", "US", "BOTTLESMALL")

Syntax Description

SDSPENDCAMPAIGN Gorilla ROI

Description:

Get total advertising spend of campaign between any period.

⚠️ Important Note:

Data from all advertising related functions are based on your advertising attributed sales. Not regular organic sales.

When you see datapoints such as sales7d or conversions7d, it means the SP SALES or the SP CONVERSIONS. Not the total sales over the last 7 days. Only the converted SP or PPC SALES. This is the same for spend, units sold, and performance numbers. It is all based on the PPC spend, PPC units sold, PPC performance.

  • Regular advertising functions (non HIST functions) aggregate the values of the period you enter. E.g. SPPRODSALES() will display the combined data over the period you enter such as “last month”.

  • HIST functions such as SPSALESPRODHIST() displays the daily value.

  • All values are PPC attributed data.

Syntax:

GORILLA_SDSPENDCAMPAIGN (sellerId, [period], [marketplace], [campaign], [output], [start_date], [end_date], [header])

Seller ID – REQUIRED
Enter the seller ID or nickname you entered in your Gorilla account.

PERIOD – OPTIONAL
Predefined period to get ads data or use ‘custom’ to specify a start and end date. Default will be last 30 days (ignored if “DAYS” has a value).

Period Attributes:

Today

This month

Last 3 Months

Yesterday

This quarter

Last 12 Months

Same day last week

This year

Last 7 Days Week Ago

Same day last month

This Year-to-Last-Month

Last 7 Days Year Ago

Same day last year

Last Week

Last 30 Days Month Ago

Last 7 Days

Last Month

Last 30 Days Year Ago

Last 14 Days

Last Quarter

Last Week Year Ago

Last 30 Days

Last Year

Last Month Year Ago

Last 90 Days

Last 60 Days

YYYY-MM (change format to text)

This week

YYYY

YYYYQ1… YYYYQ4

Custom

MARKETPLACE – OPTIONAL
Marketplace country filter. Country codes are US, CA, MX, BR, BE, UK, DE, ES, IT, FR, NL, PL, TR, IN, SE, AE, AU, SG, JP, EG, SA. Use ALL to combine values from a single account, EURO to combine countries using EURO currency, EU for all Europe markets EXCEPT UK.

CAMPAIGN – OPTIONAL
Include campaign to filter data by campaign. Use SDCAMPAIGNLIST to list the Names. Can be a range of values like A1:A100 where A1 to A100 consists of values like Campaign1, Campaign2, Campaign3…

OUTPUT – OPTIONAL
Use to select the type of data output required. Use ‘SINGLE’ to get a single value output of the single advertising. Use ‘TOTAL’ to generate a table of the datapoint corresponding. Valid values: ‘TOTAL’ or ‘SINGLE'(default is ‘SINGLE’).

START_DATE – OPTIONAL
Starting date to get ads sales from when period is custom.

END_DATE – OPTIONAL
Ending date to get ads sales till when period is custom.

HEADER – OPTIONAL
Include the header line in the results. Possible values: TRUE/FALSE. Default: TRUE

Screenshot:

SDSPENDCAMPAIGN 1 Gorilla ROI

Examples:

🚨 Use ranges (e.g.A2:A1000) in your formula wherever possible for quicker results and to prevent Google from blocking your account for 24 hrs due to overloading their resources. 
=GORILLA_SDSPENDCAMPAIGN("TOY STORE", "2023", "US")

Returns how much money is spent on advertising in the US marketplace in 2023. It lists the campaign names, amount spent, and uses the US dollars currency.

=GORILLA_SDSPENDCAMPAIGN("TOY STORE", "2023", "US", "BOTTLESMALL")

Returns the amount spent on advertising for the ‘BottleSmall’ campaign in the US marketplace in 2023. It shows the spending in the US dollars currency.

=GORILLA_SDSPENDCAMPAIGN("TOY STORE", "2023", "US", "BOTTLESMALL")

Returns a dump of the amount spent on advertising for the ‘BottleSmall’ campaign in the US marketplace in 2023. The spending details, presented in a table-like format.

Did this answer your question?