├── CONTRIBUTING.md ├── README.md ├── low_volume_skus_test.js ├── low_volume_skus.js └── LICENSE /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We would love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement. You (or your employer) retain the copyright to your contribution; 10 | this simply gives us permission to use and redistribute your contributions as 11 | part of the project. Head over to to see 12 | your current agreements on file or to sign a new one. 13 | 14 | You generally only need to submit a CLA once, so if you've already submitted one 15 | (even if it was for a different project), you probably don't need to do it 16 | again. 17 | 18 | ## Code reviews 19 | 20 | All submissions, including submissions by project members, require review. We 21 | use GitHub pull requests for this purpose. Consult 22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 23 | information on using pull requests. 24 | 25 | ## Community Guidelines 26 | 27 | This project follows [Google's Open Source Community 28 | Guidelines](https://opensource.google/conduct/). 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Low Volume SKUs 2 | 3 | This is a solution to be used by shopping Customers (CSS, GCS). It consists of a 4 | script (js) to be run in Google Ads Scripts. It uses Google Ads API (the 5 | previous version used AdWords API, which is [deprecated](https://ads-developers.googleblog.com/2022/03/the-adwords-api-sunsets-on-april-27-2022.html)). 6 | 7 | ## Requirements to use the Script 8 | 9 | * Merchant Center Sub Account (*not MCA*) 10 | * A Spreadsheet with 2 columns (for supplemental feed). 11 | * A free custom Label (otherwise existing values will be replaced with the 12 | values from supplemental feed.) 13 | 14 | NOTE: MCAs require a combination of various components (CF, BQ, GCS) to use 15 | supplemental feeds - which won't work with this - so a solution is WIP. 16 | 17 | ## Steps to implement the script 18 | 19 | Here is a simplified overview of the steps. A detailed step by step description 20 | can be found in the deck below. * 21 | [Implementation Deck](https://services.google.com/fh/files/helpcenter/zombie2.pdf) 22 | 23 | 1. Create a new spreadsheet and name columns 1 and 2 (cells A1 and B1) 'id' and 24 | 'custom_label_0-4' (eg. custom_label_4). 25 | 2. Create a new Google Ads Script (Tools settings > Bulk Actions > Scripts). 26 | 3. Copy the 27 | [script](https://github.com/google/low_volume_skus/blob/main/low_volume_skus.js) 28 | content and paste in the newly created Google Ads Script. 29 | 4. **REPLACE** (at least) the variables for: * CUSTOM_LABEL_NR, * 30 | SPREADSHEET_URL, 31 | 5. **Check** other variables that you may want to change: * THRESHOLD, 32 | USE_CAMPAIGN_FILTER, FILTER_CAMPAIGN_NAME, PRODUCT_ID_CAPITALISED, 33 | TIME_DURATION, and/or COUNT_LIMIT. 34 | 6. Authorize your script to run in Google Ads Account. 7. Run the script (you 35 | can also hit preview) and check for potential errors in the execution logs 36 | or in your spreadsheet. 37 | 7. Set a frequency to run your script automatically. 9. Create a supplemental 38 | feed in your Google Merchant Center account, using the spreadsheet created 39 | above. 40 | 8. Create a new Low Volume SKU campaign and use inventory filters to target 41 | items via the custom label. 42 | 43 | Note: It is important that both schedules (from script and supplemental feed) 44 | are timed correctly so that new labeled product are properly picked up. 45 | 46 | ## Known issues 47 | 48 | 1. If capitalised offer_ids are used - script must be adjusted based on the 49 | naming convention as Ads API converting offer_id values to lowercase which will 50 | cause mismatch during supplemental feed processing. Please use PRODUCT_ID_CAPITALISED 51 | flag to convert offer_id's to upper case. 52 | 53 | ## Licensing 54 | 55 | Terms of the release - Copyright 2021 Google LLC. Licensed under the Apache 56 | License, Version 2.0. 57 | 58 | **This is not an officially supported Google product.** 59 | -------------------------------------------------------------------------------- /low_volume_skus_test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview This file contains tests & test data for low_volume_skus. 3 | */ 4 | 5 | let TEST_PASS_FAIL = { 'PASSED': 0, 'FAILED': 0, 'RAN': 0 }; 6 | 7 | // Test Data based on customer experiences. 8 | const testData = [ 9 | { 10 | 'PRODUCT_ID_CAPITALISED': true, 11 | 'THRESHOLD': "10", 12 | 'metrics.clicks': "3", 13 | 'segments.product_item_id': 'abcd-12345' 14 | }, 15 | { 16 | 'PRODUCT_ID_CAPITALISED': true, 17 | 'THRESHOLD': "20", 18 | 'metrics.clicks': "30", 19 | 'segments.product_item_id': 'efgh-67890' 20 | } 21 | ]; 22 | 23 | const testCases = [ 24 | { 25 | 'id': 'test-clicks-less-than-threshold', 26 | 'want': { 27 | 'result_click': true, 28 | 'result_upper': 'ABCD-12345' 29 | } 30 | }, 31 | { 32 | 'id': 'test-clicks-more-than-threshold', 33 | 'want': { 34 | 'result_click': false, 35 | 'result_upper': 'EFGH-67890' 36 | } 37 | } 38 | ] 39 | 40 | 41 | /** 42 | * This function is used to test the output of getFilteredShoppingProducts 43 | * @param {?object} testCases the test cases defined above. 44 | * @param {?object} testData the data represented from an ads report query. 45 | **/ 46 | function test_getFilteredShoppingProducts(testCases, testData) { 47 | var products = []; 48 | var count = 0; 49 | while (count < testData.length) { 50 | var row = testData[count]; 51 | var testRow = testCases[count]; 52 | var PRODUCT_ID_CAPITALISED = row['PRODUCT_ID_CAPITALISED']; 53 | var THRESHOLD = row['THRESHOLD']; 54 | var clicks = row['metrics.clicks']; 55 | var productId = (PRODUCT_ID_CAPITALISED) ? 56 | row['segments.product_item_id'].toUpperCase() : 57 | row['segments.product_item_id']; 58 | 59 | // Label product as low volume, if below threshold defined above. 60 | if (parseInt(clicks) < parseInt(THRESHOLD)) { 61 | testOutput(testRow.id, true, testRow.want.result_click, 'result click unexpected value.') 62 | testOutput(testRow.id, (productId == testRow.want.result_upper), true, 'result upper unexpected value.') 63 | count += 1; 64 | // Label product as ramped up, if it surpasses expected threshold. 65 | } else { 66 | testOutput(testRow.id, false, testRow.want.result_click, 'result click unexpected value') 67 | testOutput(testRow.id, (productId == testRow.want.result_upper), true, 'result upper unexpected value.') 68 | count += 1; 69 | } 70 | } 71 | } 72 | 73 | /** 74 | * Run this first to begin test cases. 75 | */ 76 | function initTesting() { 77 | // run test 78 | test_getFilteredShoppingProducts(testCases, testData); 79 | 80 | // Log test results 81 | Logger.log(TEST_PASS_FAIL); 82 | } 83 | 84 | /** 85 | * This function is used to test the output of a test. It will print the error 86 | * if the test fails. 87 | * @param {string} testCaseId the test case id (bug id) for tracking. 88 | * @param {?object} actual the value that is present from the test. 89 | * @param {?object} expected the expected value of the test. 90 | * @param {string} errif the error that should be shown in logger upon failure. 91 | * 92 | * @return {!bool} if the test has successfully passed or not. 93 | */ 94 | function testOutput(testCaseId, actual, expected, errif) { 95 | Logger.log(`Test - ${testCaseId}: ${actual == expected ? '++PASSED++' : '--FAILED--'}`); 96 | 97 | // log error 98 | if (actual != expected) { 99 | TEST_PASS_FAIL['FAILED']++; 100 | Logger.log(`Error:\n${errif}`); 101 | } else { 102 | TEST_PASS_FAIL['PASSED']++; 103 | } 104 | 105 | Logger.log(`Actual:\n${actual}`); 106 | Logger.log(`Expected:\n${expected}`); 107 | 108 | TEST_PASS_FAIL['RAN']++; 109 | 110 | return (actual == expected); 111 | } -------------------------------------------------------------------------------- /low_volume_skus.js: -------------------------------------------------------------------------------- 1 | /* This Script pulls all products associated with the account CID. 2 | * You can optionally add a MerchantId filter, as stated below. 3 | * Please modify the variable for spreadsheet link as instructed below 4 | * Some other variables may be modified by demand, following guideline in 5 | comments. 6 | * Currently this script outputs 2 columns, the product ID and the custom label. 7 | * IMPORTANT: An EMPTY label is required for this solution. 8 | * NOTE: A product should not be running in multiple campaigns. 9 | 10 | * COPY THIS SCRIPT INTO YOUR GOOGLE ADS SCRIPT. 11 | */ 12 | 13 | 14 | // Define which custom label nr [0-4] will be used. 15 | // IMPORTANT: Ensure this label is free and only used for this solution. 16 | // This number should match the custom_label nr in the second column of the 17 | // spreadsheet above. 18 | var CUSTOM_LABEL_NR = '4'; 19 | 20 | // Create a new Google spreadsheet. 21 | // Replace the URL below with the newly created one (or replace the ID). 22 | // Add these values to A1 and B1 respectively: 23 | // A1 = 'id', B1 = 'custom_label4' - the nr of the custom label should match the 24 | // above. Name this working sheet 'LowVolume'. Copy the link of the new sheet 25 | // and paste it below. 26 | var SPREADSHEET_URL = 27 | 'https://docs.google.com/spreadsheets/d/SPREADSHEET_ID'; 28 | 29 | // Set the value for the label for newly flagged low volume products. 30 | var LABEL_LOW = 'low_clicks_last_30d'; 31 | 32 | // Set the value for the label for low volume products that have ramped up. 33 | var LABEL_RAMPED_UP = 'product_ramped_up'; 34 | 35 | // Set the nr. of clicks with which should be considered ramped_up. 36 | // It needs to be a string to be added as part of the query statement. 37 | var THRESHOLD = '1'; 38 | 39 | // The following filter will detect low volume products, using the threshold 40 | // above. You can add other metrics to filter on, for ex. adding AND 41 | // metrics.impressions < 100. Optionally you can filter on a merchant, e.g. 42 | // adding AND MerchantId = 1234. 43 | var FILTER_NO_CLICKS = 'metrics.clicks < ' + THRESHOLD; 44 | 45 | // The following filter will identify products that have already ramped up. 46 | // As a condition, it must have the previously added label and for ex. clicks 47 | // >50. To add further conditions use the AND clause, e.g. AND Conversions > 10. 48 | var FILTER_RAMPED_UP = 'metrics.clicks > ' + THRESHOLD + 49 | ' AND segments.product_custom_attribute' + CUSTOM_LABEL_NR + ' LIKE "%' + 50 | LABEL_LOW + '%" '; 51 | 52 | // To filter campaign names, add for ex. AND campaign.name LIKE “%FR_FR%”. 53 | // Set the filter to true to include it. 54 | var USE_CAMPAIGN_FILTER = false; 55 | var FILTER_CAMPAIGN_NAME = ' AND campaign.name LIKE "%FR_FR_%" '; 56 | 57 | // To filter a Merchant Center account, add "AND segments.product_merchant_id = 1234" 58 | // Helpful when multiple Merchant Center accounts are under one Google Ads account 59 | // Set the filter to true to include it. 60 | var USE_MERCHANT_CENTER_ID_FILTER = false; 61 | var FILTER_MERCHANT_CENTER_ID = ' AND segments.product_merchant_id = 123456789 '; 62 | 63 | // Google Ads API returns product Id values in lower cases. If your product ID 64 | // is capitalised please, set following flag to true. 65 | var PRODUCT_ID_CAPITALISED = false; 66 | 67 | // Enter time duration below. Possibilities: 68 | // TODAY | YESTERDAY | LAST_7_DAYS | LAST_WEEK | LAST_BUSINESS_WEEK | 69 | // THIS_MONTH | LAST_MONTH | LAST_14_DAYS | LAST_30_DAYS | 70 | // THIS_WEEK_SUN_TODAY | THIS_WEEK_MON_TODAY | LAST_WEEK_SUN_SAT Currently 71 | // default time duration is set to: LAST_30_DAYS 72 | var TIME_DURATION = 'LAST_30_DAYS'; 73 | 74 | // This variable helps control data overflow in the target sheet. 75 | // Increasing this value may cause timeouts and sheet errors. 76 | // For ex. 10K products may take ~30 secs to run, 100K ~ 5 mins, while 500K 77 | // could take 20+ mins. 78 | var COUNT_LIMIT = '10000'; 79 | 80 | 81 | function main() { 82 | var productsNoClicks = 83 | getFilteredShoppingProducts(FILTER_NO_CLICKS, checkLabel = false); 84 | var productsRampedUp = 85 | getFilteredShoppingProducts(FILTER_RAMPED_UP, checkLabel = true); 86 | var products = productsNoClicks.concat(productsRampedUp); 87 | pushToSpreadsheet(products); 88 | } 89 | 90 | function getFilteredShoppingProducts(filters, checkLabel) { 91 | var campaignField = ''; 92 | if (USE_CAMPAIGN_FILTER) { 93 | campaignField = 'campaign.name, '; 94 | filters = filters + FILTER_CAMPAIGN_NAME 95 | } 96 | var merchantIdField = ''; 97 | if (USE_MERCHANT_CENTER_ID_FILTER) { 98 | merchantIdField = 'segments.product_merchant_id, '; 99 | filters = filters + FILTER_MERCHANT_CENTER_ID 100 | } 101 | var labelField = '' 102 | if (checkLabel) { 103 | label = 'segments.product_custom_attribute' + CUSTOM_LABEL_NR 104 | labelField = label + ', ' 105 | }; 106 | 107 | var query = 'SELECT segments.product_item_id, ' + campaignField + merchantIdField + labelField + 108 | 'metrics.clicks, metrics.impressions ' + 109 | 'FROM shopping_performance_view WHERE ' + filters + 110 | ' AND segments.product_item_id != "undefined"' + 111 | ' AND segments.date DURING ' + TIME_DURATION + 112 | ' ORDER BY segments.product_item_id LIMIT ' + COUNT_LIMIT; 113 | 114 | var products = []; 115 | var count = 0; 116 | var report = AdsApp.report(query); 117 | var rows = report.rows(); 118 | while (rows.hasNext()) { 119 | var row = rows.next(); 120 | var clicks = row['metrics.clicks']; 121 | var productId = (PRODUCT_ID_CAPITALISED) ? 122 | row['segments.product_item_id'].toUpperCase() : 123 | row['segments.product_item_id']; 124 | 125 | // Label product as low volume, if below threshold defined above. 126 | if (parseInt(clicks) < parseInt(THRESHOLD)) { 127 | products.push([productId, LABEL_LOW]); 128 | count += 1; 129 | 130 | // Label product as ramped up, if it surpasses expected threshold. 131 | } else { 132 | products.push([productId, LABEL_RAMPED_UP]); 133 | count += 1; 134 | } 135 | } 136 | Logger.log(count); 137 | return products; 138 | } 139 | 140 | function pushToSpreadsheet(data) { 141 | var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL); 142 | var sheet = spreadsheet.getSheetByName('LowVolume'); 143 | 144 | var lastRow = sheet.getMaxRows(); 145 | sheet.getRange('A2:B' + lastRow).clearContent(); 146 | 147 | var start_row = 2; 148 | var endRow = start_row + data.length - 1; 149 | var range = sheet.getRange( 150 | 'A' + start_row + ':' + 151 | 'B' + endRow); 152 | if (data.length > 0) { 153 | range.setValues(data); 154 | } 155 | 156 | return; 157 | } 158 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | --------------------------------------------------------------------------------