ScriptTags
Create, read, update or delete script tags.
Table-Specific Information
Select
The provider processes all filters client-side within the provider. For CreatedAt and UpdatedAt the supported SQL operators are '>' and '<'. The following queries are the only ones processed server-side:SELECT * FROM ScriptTags
SELECT * FROM ScriptTags WHERE Id = '123'
SELECT * FROM ScriptTags WHERE CreatedAt > '2018-05-02'
SELECT * FROM ScriptTags WHERE UpdatedAt < '2017-08-15'
SELECT * FROM ScriptTags WHERE Src = 'https://example.com/my_script.js'
Insert
You must specify event and src to create a ScriptTag.
INSERT INTO Scripttags (event, src) VALUES ('onload', 'https://js-aplenty.com/abc.js')
Update
You must specify the id to update a ScriptTag. For example:
UPDATE ScriptTags SET src = 'https://js-aplenty.com/abc.js' WHERE Id = '77171130'
Delete
You must specify the Id of the ScriptTag to delete it.
DELETE FROM ScriptTags WHERE Id = '555695'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
The ID for the script tag. | |
Cache | Bool | False |
Whether the Shopify CDN can cache and serve the script tag. | |
CreatedAt | Datetime | True |
The date and time (ISO 8601) when the script tag was created. | |
DisplayScope | String | False |
The page or pages on the online store where the script should be included. | |
Event | String | False |
The DOM event that triggers the loading of the script. Valid values: onload. | |
Src | String | False |
The URL of the remote script. | |
UpdatedAt | Datetime | True |
The date and time (ISO 8601) when the script tag was last updated. |