Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add/update gtm event triggers, fix min height

Ed Plato16198a1267b4
diff --git a/doc/embed.md b/doc/embed.md
index 1e1285ba4..6231d5692 100644
--- a/doc/embed.md
+++ b/doc/embed.md
@@ -6,6 +6,6 @@ See [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe](https://d
**Example `<iframe>` code:**
-```<iframe src="https://worldview.earthdata.nasa.gov/?em=true" role="application" sandbox="allow-scripts allow-same-origin allow-forms allow-popups" width="100%" height="100%" allow="fullscreen; autoplay;" loading="lazy"></iframe>```
+```<iframe src="https://worldview.earthdata.nasa.gov/?em=true" role="application" sandbox="allow-modals allow-scripts allow-same-origin allow-forms allow-popups" width="100%" height="100%" allow="fullscreen; autoplay;" loading="lazy"></iframe>```
**Note:** Certain application features and button/tab interactions are not available in embed mode. We recommend to limit the number of layers you share - hidden layers will be filtered out and are not toggleable by the end user. A helpful tip is to provide detailed captions to assist the user in better understanding the science concepts that you are sharing.
diff --git a/web/js/containers/embed.js b/web/js/containers/embed.js
index 551bec04b..83cb70ce1 100644
--- a/web/js/containers/embed.js
+++ b/web/js/containers/embed.js
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Button } from 'reactstrap';
+import googleTagManager from 'googleTagManager';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { getPermalink } from '../modules/link/util';
import getSelectedDate from '../modules/date/selectors';
@@ -27,6 +28,9 @@ class Embed extends React.Component {
const { selectedDate } = this.props;
const queryString = history.location.search || '';
const permalink = getPermalink(queryString, selectedDate);
+ googleTagManager.pushEvent({
+ event: 'embed_open_new_tab',
+ });
window.open(permalink, '_blank');
}
diff --git a/web/js/containers/share.js b/web/js/containers/share.js
index f4886caa8..5b5252b69 100644
--- a/web/js/containers/share.js
+++ b/web/js/containers/share.js
@@ -94,7 +94,7 @@ class ShareLinkContainer extends Component {
if (!isShort && shortLinkKey !== queryString) {
this.getShortLink().then(() => {
googleTagManager.pushEvent({
- event: 'social_link_shorten',
+ event: 'share_link_shorten',
});
this.setState({
shortLinkKey: queryString,
@@ -109,7 +109,12 @@ class ShareLinkContainer extends Component {
}
copyToClipboard = (url) => {
+ const { activeTab } = this.state;
const options = window.clipboardData ? {} : { format: 'text/plain' };
+ googleTagManager.pushEvent({
+ event: 'share_link_copy',
+ link_type: activeTab,
+ });
options.onCopy = () => {
this.setState({
tooltipToggleTime: Date.now(),
@@ -129,7 +134,7 @@ class ShareLinkContainer extends Component {
let shareLink = getShareLink(type, permalink);
googleTagManager.pushEvent({
- event: 'social_share_platform',
+ event: 'share_social_platform',
social_type: type,
});
diff --git a/web/js/containers/sidebar/layers-container.js b/web/js/containers/sidebar/layers-container.js
index 9d4702cc0..32029235a 100644
--- a/web/js/containers/sidebar/layers-container.js
+++ b/web/js/containers/sidebar/layers-container.js
@@ -114,7 +114,7 @@ function LayersContainer (props) {
: height;
if (isEmbedModeActive) {
- minHeight = '25px';
+ minHeight = '100px';
maxHeight = '55vh';
} else {
maxHeight += 'px';