Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gtm_datalayer.html #206

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ckanext/datagovtheme/templates/snippets/gtm/gtm_datalayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

<script type="application/ld+json" class="jsonld-dataset">
dataLayer = [{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to push this object TO anything?
is datalayer created already or do we need to instantiate the var?

Copy link
Member

@tdlowden tdlowden Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@btylerburton This would be the next thing I try if the syntax fixes dont work. Made comment here: GSA/data.gov#4783 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if window.dataLayer exists already this would replace it with this. Typically, you'd push so as not to wipe/replace anything pre-existing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I don't think that the dataLayer exists prior, but I'm not sure how to test that. Definitely very open to advice/contributions for the front end stuff.

'nodeID':, '{{ pkg.id }}',
'contentType": 'dataset',
'language': '{{ language }},
'homepageTest': "not_homepage",
"nodeID": "{{ pkg.id }}",
"contentType": "dataset",
"language": "{{ language }}",
"homepageTest": "not_homepage",
"basicPagesubType": "dataset",
"Page_Type": "Dataset Page",
"organization": '{{ organization }}',
"publisher": '{{ publisher }}',
"organization": "{{ organization }}",
"publisher": "{{ publisher }}"
}];
</script>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="ckanext-datagovtheme",
version="0.2.29",
version="0.2.30",
description="CKAN Extension to manage data.gov theme",
long_description=long_description,
classifiers=[
Expand Down
Loading