-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd1065d
commit 391ee8d
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
ckanext/datagovtheme/templates/snippets/gtm/gtm_datalayer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
{% set pkg = c.pkg_dict %} | ||
{% if pkg %} | ||
|
||
{% block gtmdatalayer %} | ||
{% set dataset = pkg.title or pkg.name or "Data.gov Dataset" %} | ||
{% set organization = pkg.organization.title or pkg.organization.name or "error-org" %} | ||
{% set publisher = pkg.extras.publisher or pkg.organization.name or "error-publsiher" %} | ||
{% set language = pkg.extras.language or "en" %} | ||
|
||
<script type="application/ld+json" class="jsonld-dataset"> | ||
dataLayer = [{ | ||
'nodeID':, {% pkg.id %}, | ||
'contentType": 'dataset', | ||
'language': {% language %}, | ||
'homepageTest': "not_homepage", | ||
"basicPagesubType": "dataset", | ||
"Page_Type": "Dataset Page", | ||
"organization": {% organization %}, | ||
"publisher": {% publisher %}, | ||
}]; | ||
</script> | ||
{% endblock %} | ||
{% endif %} |