The Lusitania was attacked in 1915 and it was two more years before the US joined the war. At the time of the sinking it was condemned by the press and the President as a hostile act. The British Prime Minister believed it would be enough to bring the US into the war. It was not at the time. The Congress and President continued to view the war as a European conflict.
It was not forgotten, though. When the US did enter the war, the sinking of the Lusitania was used in recruiting materials which told the population never to forget the sinking and the innocent women and children who were non-combatents killed without mercy by the German Hun. The sinking turned out to be a powerful recruiting tool.