AdWords
2.3K members online now
2.3K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Inventory management script - Error in ReferenceError: "rule" is not defined. (line 604)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

I am trying out the script provided Google; https://developers.google.com/adwords/scripts/docs/solutions/inventory-management.

it returns the following error: ReferenceError: "rule" is not defined. (line 604).

Can someone help me finding out what is not set up correctly?

thank you in advance
Amandine

Re: Inventory management script - Error in ReferenceError: "rule" is not defined. (line 60

Top Contributor Alumni
# 2
Top Contributor Alumni
Have you set up rules sheet as expected in the template https://docs.google.com/spreadsheets/d/11z_Q1g4QgqGTHDZRrTxGIT-VPqqwHfgo7Hr-wSczfz8/edit?
Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog

Re: Inventory management script - Error in ReferenceError: "rule" is not defined. (line 60

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi @theniks,

thanks for your reply.
I did set it up as required: copy of this doc, change of the spreadsheet URL in the script, product code in column B of sheet Stats, stock inclusion + label the ad groups with this code (I did the manual option), yes to "enable rules" and "enable ads".

applied the below:
Comment out the call to syncSpreadsheetWithDatabase method on line 67 in the main() method as follows.

// syncSpreadsheetWithDatabase(spreadsheet, productKeys);
Manually update the inventory information in the Stock column of the Stats spreadsheet.

Where does the error could come from? "ReferenceError: "rule" is not defined. (line 604)", am I forgetting something in the set up?

best
Amandine