Skip to content

Commit 09cdc10

Browse files
committed
Send userID if it exists
1 parent 5f8ebfd commit 09cdc10

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/Rating/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ class Rating extends React.Component {
2222

2323
rateDoc = user => (e) => {
2424
const rating = parseInt( e.target.dataset.rating );
25+
const userID = user ? user.userid : false;
26+
2527

2628
this.setState({
2729
rating,
2830
hasRating: true,
2931
})
3032

3133
analytics.track("Doc Rated", {
32-
userID: false, // SendGrid userID or false
3334
docID: window.location.pathname,
35+
userID, // SendGrid userID or false
3436
rating
3537
});
3638
}

0 commit comments

Comments
 (0)